]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream-int: always report received shutdowns
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 15:32:24 +0000 (16:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 15:34:26 +0000 (16:34 +0100)
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

index a71b2d6265c8651bbab16b3eb7740e676e123aad..16bd3f8f7c94c6677cc9f4d63a3094642a642736 100644 (file)
@@ -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)) {