From: Christopher Faulet Date: Fri, 5 May 2023 09:40:07 +0000 (+0200) Subject: MEDIUM: stconn: Check room needed to unblock SC on fast-forward X-Git-Tag: v2.8-dev10~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=18b3309f38108bdc0ba8d2bff2c66cb74d08f346;p=thirdparty%2Fhaproxy.git MEDIUM: stconn: Check room needed to unblock SC on fast-forward During fast-forward, if the SC is waiting for a minimum free space to receive more data and some data was sent, it is only unblock is the condition is respected. 0 is special case where the SC is unconditionally unblocked. --- diff --git a/src/stconn.c b/src/stconn.c index 41172519f0..4290961d1f 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -1088,7 +1088,7 @@ static void sc_notify(struct stconn *sc) /* check if the consumer has freed some space either in the * buffer or in the pipe. */ - if (new_len < last_len) + if (!sc->room_needed || (new_len < last_len && (sc->room_needed < 0 || channel_recv_max(ic) >= sc->room_needed))) sc_have_room(sc); }