From e74679a9c65009931c75ca92e31751b2a5573554 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 6 Aug 2019 15:39:32 +0200 Subject: [PATCH] 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. --- src/mux_h2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mux_h2.c b/src/mux_h2.c index 89a8c0b38..d342009e2 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)