From: Willy Tarreau Date: Tue, 4 Dec 2018 14:23:57 +0000 (+0100) Subject: BUG/MEDIUM: mux-h2: stop sending HTX once the mux is blocked X-Git-Tag: v1.9-dev10~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b08d91fbc5f2cff65a4c6916490df70eda5232db;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mux-h2: stop sending HTX once the mux is blocked If we're blocking on mux full, mux busy or whatever, we must get out of the loop. In legacy mode this problem doesn't exist as we can normally return 0 but here it's not a sufficient condition to stop sending, so we must inspect the blocking flags as well. No backport is needed. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index c56efc2f82..bfcfc267f4 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -4602,7 +4602,7 @@ static size_t h2_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t coun } if (htx) { - while (count && !htx_is_empty(htx)) { + while (!(h2s->flags & H2_SF_BLK_ANY) && count && !htx_is_empty(htx)) { idx = htx_get_head(htx); blk = htx_get_blk(htx, idx); btype = htx_get_blk_type(blk);