]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stream: take care of synchronous errors when trying to send
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Jan 2019 14:18:19 +0000 (15:18 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Jan 2019 18:06:43 +0000 (19:06 +0100)
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.

src/stream.c

index 291858941a4b786be7a2dd0ebb445b8fbfdc249f..ade70bc7cba390f7829720bb617f42036b5e6c13 100644 (file)
@@ -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;