From 18955db43dd242c96f81f248b11ae56e01a21e89 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 23 Jan 2020 16:32:24 +0100 Subject: [PATCH] MINOR: stream-int: always report received shutdowns As mentioned in c192b0ab95 ("MEDIUM: connection: remove CO_FL_CONNECTED and only rely on CO_FL_WAIT_*"), si_cs_recv() currently does not propagate CS_FL_EOS to CF_READ_NULL if CO_FL_WAIT_L4L6 is set, while this situation doesn't exist anymore. Let's get rid of this confusing test. --- src/stream_interface.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/stream_interface.c b/src/stream_interface.c index a71b2d626..16bd3f8f7 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -1499,14 +1499,11 @@ int si_cs_recv(struct conn_stream *cs) ret = 1; } else if (cs->flags & CS_FL_EOS) { - /* connection closed */ - if (!(conn->flags & CO_FL_WAIT_L4L6)) { - /* we received a shutdown */ - ic->flags |= CF_READ_NULL; - if (ic->flags & CF_AUTO_CLOSE) - channel_shutw_now(ic); - stream_int_read0(si); - } + /* we received a shutdown */ + ic->flags |= CF_READ_NULL; + if (ic->flags & CF_AUTO_CLOSE) + channel_shutw_now(ic); + stream_int_read0(si); ret = 1; } else if (!si_rx_blocked(si)) {