]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-h2: always send stream window update before connection's
authorWilly Tarreau <w@1wt.eu>
Tue, 6 Aug 2019 13:39:32 +0000 (15:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 6 Aug 2019 13:39:32 +0000 (15:39 +0200)
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

index 89a8c0b38efc3908da6ab2cdf4ad2b2102b44fea..d342009e213fb903435a7fff318865fa08e9a08d 100644 (file)
@@ -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)