From: Olivier Houchard Date: Wed, 10 Oct 2018 16:51:00 +0000 (+0200) Subject: BUG/MEDIUM: h2: Make sure we're not in the send list on flow control. X-Git-Tag: v1.9-dev4~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dddfe312650affccae1ea149209537258bdc6e9d;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: h2: Make sure we're not in the send list on flow control. If we can't send data for a stream because of its flow control, make sure not to put it in the send_list, until the flow control lets it send again. This is specific to 1.9, and should not be backported. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 568168f532..fee3d536df 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1473,7 +1473,9 @@ static int h2c_handle_window_update(struct h2c *h2c, struct h2s *h2s) h2s->mws += inc; if (h2s->mws > 0 && (h2s->flags & H2_SF_BLK_SFCTL)) { h2s->flags &= ~H2_SF_BLK_SFCTL; - /* The task will be waken up later */ + if (h2s->send_wait) + LIST_ADDQ(&h2c->send_list, &h2s->list); + } } else { @@ -3393,6 +3395,10 @@ static size_t h2s_frt_make_resp_data(struct h2s *h2s, const struct buffer *buf, if (size <= 0) { h2s->flags |= H2_SF_BLK_SFCTL; + if (h2s->send_wait) { + LIST_DEL(&h2s->list); + LIST_INIT(&h2s->list); + } goto end; }