]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: stream_interface: Make sure we call si_cs_process() if CS_FL_EOI.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 7 Jun 2019 16:10:52 +0000 (18:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 Jun 2019 17:37:21 +0000 (19:37 +0200)
In si_cs_recv(), if we got the CS_FL_EOI flag on the conn_stream, make sure
we return 1, so that si_cs_process() will be called, and wake
process_stream() up, otherwise if we're unlucky the flag will never be
noticed, and the stream won't be woken up.

src/stream_interface.c

index 5a85b3bfd0bbcbe658d07631f85625cc1573acda..b5c3247e2eb3a9fce1e1a2529c3d0c8a71df2e53 100644 (file)
@@ -1480,7 +1480,7 @@ int si_cs_recv(struct conn_stream *cs)
                si_rx_endp_more(si);
        }
 
-       return (cur_read != 0) || si_rx_blocked(si);
+       return (cur_read != 0) || si_rx_blocked(si) || (cs->flags & CS_FL_EOI);
 
  out_shutdown_r:
        if (conn->flags & CO_FL_CONNECTED) {