]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stream-int: don't attempt to receive if the connection is not established
authorWilly Tarreau <w@1wt.eu>
Thu, 6 Dec 2018 14:25:58 +0000 (15:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Dec 2018 14:25:58 +0000 (15:25 +0100)
If we try to receive before the connection is established, we lose the
send event and are not woken up anymore once the connection is established.
This was diagnosed by Olivier.

No backport is needed.

include/proto/stream_interface.h

index e790c7170058da1e5102c33091c443dbbdde6364..2874664f1d018d1e0b4e2fdd3641177caf4a63e3 100644 (file)
@@ -436,7 +436,7 @@ static inline void si_chk_rcv(struct stream_interface *si)
        if (si_rx_blocked(si) || !si_rx_endp_ready(si))
                return;
 
-       if (si->state > SI_ST_EST)
+       if (si->state != SI_ST_EST)
                return;
 
        si->flags |= SI_FL_RX_WAIT_EP;