From 93c9f59a9c4211784d5d3769e6f77273cbb05916 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 17 Jan 2020 17:24:30 +0100 Subject: [PATCH] MINOR: stream-int: remove dependency on CO_FL_WAIT_ROOM for rcv_buf() The only case where this made sense was with mux_h1 but Since we introduced CS_FL_MAY_SPLICE, we don't need to rely on this anymore, thus we don't need to clear it either when we do not splice. There is a last check on this flag used to determine if the rx channel is full and that cannot go away unless it's changed to use the CS instead but for now this wouldn't add any benefit so better not do it yet. --- src/stream_interface.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/stream_interface.c b/src/stream_interface.c index a2ea7d779..ba82cae94 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -1316,10 +1316,6 @@ int si_cs_recv(struct conn_stream *cs) /* splice not possible (anymore), let's go on on standard copy */ } - else { - /* be sure not to block regular receive path below */ - conn->flags &= ~CO_FL_WAIT_ROOM; - } abort_splice: if (ic->pipe && unlikely(!ic->pipe->data)) { @@ -1344,7 +1340,7 @@ int si_cs_recv(struct conn_stream *cs) * recv(). */ while ((cs->flags & CS_FL_RCV_MORE) || - (!(conn->flags & (CO_FL_ERROR | CO_FL_WAIT_ROOM | CO_FL_HANDSHAKE)) && + (!(conn->flags & (CO_FL_ERROR | CO_FL_HANDSHAKE)) && (!(cs->flags & (CS_FL_ERROR|CS_FL_EOS))) && !(ic->flags & CF_SHUTR))) { /* may be null. This is the mux responsibility to set * CS_FL_RCV_MORE on the CS if more space is needed.