From: Willy Tarreau Date: Tue, 6 Aug 2019 13:39:32 +0000 (+0200) Subject: BUG/MINOR: mux-h2: always send stream window update before connection's X-Git-Tag: v2.1-dev2~229 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e74679a9c65009931c75ca92e31751b2a5573554;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h2: always send stream window update before connection's In h2_process_mux() if we have some room and an attempt to send a window update for the connection was pending, it's done first. But it's not done for the stream, which will have for effect of postponing this attempt till next pass into h2_process_demux(), at the risk of seeing the send buffer full again. Let's always try to send both pending frames as soon as possible. This should be backported as far as 1.8. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 89a8c0b38e..d342009e21 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2663,6 +2663,11 @@ static int h2_process_mux(struct h2c *h2c) } /* start by sending possibly pending window updates */ + if (h2c->rcvd_s > 0 && + !(h2c->flags & (H2_CF_MUX_MFULL | H2_CF_MUX_MALLOC)) && + h2c_send_strm_wu(h2c) < 0) + goto fail; + if (h2c->rcvd_c > 0 && !(h2c->flags & (H2_CF_MUX_MFULL | H2_CF_MUX_MALLOC)) && h2c_send_conn_wu(h2c) < 0)