From b78b80efe57fb7c6e195850626065d55ed5e4e3b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 12 Dec 2017 09:58:40 +0100 Subject: [PATCH] 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. --- src/stream_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.47.3