From: Willy Tarreau Date: Wed, 23 Jan 2019 14:18:19 +0000 (+0100) Subject: BUG/MINOR: stream: take care of synchronous errors when trying to send X-Git-Tag: v2.0-dev1~164 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64f6945fec20a02d90c647c7426a989b903f6f5d;p=thirdparty%2Fhaproxy.git BUG/MINOR: stream: take care of synchronous errors when trying to send We currently detect a number of situations where we have to immediately deal with a state change, but we failed to consider the case of the synchronous error reported on the stream-interface. We definitely do not want to have to wait for a timeout to handle this one, especially at the beginning of the connection when it can lead to an immediate retry. This should be backported to 1.9. --- diff --git a/src/stream.c b/src/stream.c index 291858941a..ade70bc7cb 100644 --- a/src/stream.c +++ b/src/stream.c @@ -2503,6 +2503,7 @@ redo: if (si_f->state == SI_ST_DIS || si_f->state != si_f->prev_state || si_b->state == SI_ST_DIS || si_b->state != si_b->prev_state || + ((si_f->flags | si_b->flags) & SI_FL_ERR) || (((req->flags ^ rqf_last) | (res->flags ^ rpf_last)) & CF_MASK_ANALYSER)) goto redo;