]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h2: Don't forget to quit the sending_list if SUB_CALL_UNSUBSCRIBE.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 20 Dec 2018 10:56:28 +0000 (11:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 20 Dec 2018 11:24:43 +0000 (12:24 +0100)
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

index 0b28c38c95f2a58a6a31b76902e8e47d17959650..20b96517347882c87b288efd167db03f0afc46d6 100644 (file)
@@ -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;