From fd8bd4521a028006d38df3ce4fcf70929ec8aecc Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Thu, 21 Mar 2019 15:50:58 +0100 Subject: [PATCH] BUG/MEDIUM: mux-h2: Use the right list in h2_stop_senders(). In h2_stop_senders(), when we're about to move the h2s about to send back to the send_list, because we know the mux is full, instead of putting them all in the send_list, put them back either in the fctl_list or the send_list depending on if they are waiting for the flow control or not. This also makes sure they're inserted in their arrival order and not reversed. This should be backported to 1.9. --- src/mux_h2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index f8b9ecc83..c2a368301 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -5239,7 +5239,10 @@ static void h2_stop_senders(struct h2c *h2c) task_remove_from_task_list((struct task *)h2s->send_wait->task); h2s->send_wait->events |= SUB_RETRY_SEND; h2s->send_wait->events &= ~SUB_CALL_UNSUBSCRIBE; - LIST_ADD(&h2c->send_list, &h2s->list); + if (h2s->flags & H2_SF_BLK_MFCTL) + LIST_ADDQ(&h2c->fctl_list, &h2s->list); + else + LIST_ADDQ(&h2c->send_list, &h2s->list); } }