From f29cd5c8a8ae593895e689ded1d4c6c53eb851c3 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Thu, 20 Dec 2018 11:56:28 +0100 Subject: [PATCH] BUG/MEDIUM: h2: Don't forget to quit the sending_list if SUB_CALL_UNSUBSCRIBE. In mux_h2_unsubscribe, don't forget to leave the sending_list if SUB_CALL_UNSUBSCRIBE was set. SUB_CALL_UNSUBSCRIBE means we were about to be woken up for writing, unless the mux was too full to get more data. If there's an unsubscribe call in the meanwhile, we should leave the list, or we may be put back in the send_list. This should be backported to 1.9. --- src/mux_h2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mux_h2.c b/src/mux_h2.c index 0b28c38c9..20b965173 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -4600,6 +4600,8 @@ static int h2_unsubscribe(struct conn_stream *cs, int event_type, void *param) if (h2s->send_wait == sw) { sw->events &= ~SUB_CALL_UNSUBSCRIBE; h2s->send_wait = NULL; + LIST_DEL(&h2s->list); + LIST_INIT(&h2s->list); } } return 0;