From: Willy Tarreau Date: Thu, 28 Aug 2008 09:07:58 +0000 (+0200) Subject: [MINOR] only call flow analysers when their read side is connected. X-Git-Tag: v1.3.16-rc1~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36e6a41bc8fe13d76f5ea6016189d44d1614f6c9;p=thirdparty%2Fhaproxy.git [MINOR] only call flow analysers when their read side is connected. It's useless to call flow analysers when their read side has not seen a connection yet. --- diff --git a/src/proto_http.c b/src/proto_http.c index d28506d429..e8bd63142b 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -762,23 +762,23 @@ void process_session(struct task *t, int *next) } if ((rqf_req ^ s->req->flags) & BF_MASK_ANALYSER) { - resync = 1; /* the analysers must block it themselves */ - s->req->flags |= BF_MAY_FORWARD; - if (s->req->analysers) { - process_request(s); + if (s->req->prod->state >= SI_ST_EST) { + resync = 1; + s->req->flags |= BF_MAY_FORWARD; + if (s->req->analysers) + process_request(s); } rqf_req = s->req->flags; } if ((rpf_rep ^ s->rep->flags) & BF_MASK_ANALYSER) { - resync = 1; /* the analysers must block it themselves */ - if (s->req->cons->state >= SI_ST_EST) + if (s->rep->prod->state >= SI_ST_EST) { + resync = 1; s->rep->flags |= BF_MAY_FORWARD; - - if (s->rep->analysers) { - process_response(s); + if (s->rep->analysers) + process_response(s); } rpf_rep = s->rep->flags; }