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.
This commit is contained in:
Willy Tarreau 2018-12-06 14:09:09 +01:00
parent 8e162ee1f9
commit c14999b3bc

View File

@ -4612,7 +4612,8 @@ static size_t h2_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t coun
} }
if (htx) { 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); idx = htx_get_head(htx);
blk = htx_get_blk(htx, idx); blk = htx_get_blk(htx, idx);
btype = htx_get_blk_type(blk); btype = htx_get_blk_type(blk);