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.
This commit is contained in:
Olivier Houchard 2018-10-10 18:51:00 +02:00 committed by Willy Tarreau
parent fa8aa867b9
commit dddfe31265

View File

@ -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;
}