From: Willy Tarreau Date: Tue, 12 Dec 2017 08:58:40 +0000 (+0100) Subject: BUG/MINOR: stream-int: don't try to receive again after receiving an EOS X-Git-Tag: v1.9-dev1~581 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b78b80efe57fb7c6e195850626065d55ed5e4e3b;p=thirdparty%2Fhaproxy.git BUG/MINOR: stream-int: don't try to receive again after receiving an EOS When an end of stream has been reported, we should not try to receive again as the mux layer might not be prepared to this and could report unexpected errors. This is more of a strengthening measure that follows the introduction of conn_stream that came in 1.8. It's desired to backport this into 1.8 though it's uncertain at this time whether it may have caused real issues. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index cfd0b8e2ec..9f61a75105 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -1176,7 +1176,7 @@ static void si_cs_recv_cb(struct conn_stream *cs) * recv(). */ while (!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_WAIT_ROOM | CO_FL_HANDSHAKE)) && - !(cs->flags & CS_FL_ERROR) && !(ic->flags & CF_SHUTR)) { + !(cs->flags & (CS_FL_ERROR|CS_FL_EOS)) && !(ic->flags & CF_SHUTR)) { max = channel_recv_max(ic); if (!max) {