From: Willy Tarreau Date: Thu, 6 Dec 2018 13:09:09 +0000 (+0100) Subject: BUG/MEDIUM: mux-h2: stop sending using HTX on errors X-Git-Tag: v1.9-dev10~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c14999b3bced20375e7066602006cd27178d91c6;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mux-h2: stop sending using HTX on errors We didn't take care of the stream error in the HTX send loop, causing some errors (like buffer full) to provoke 100% CPU. No backport is needed. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 0eb5fd21b8..06ee7d798a 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -4612,7 +4612,8 @@ static size_t h2_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t coun } if (htx) { - while (!(h2s->flags & H2_SF_BLK_ANY) && count && !htx_is_empty(htx)) { + while (h2s->st < H2_SS_ERROR && !(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);