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.
This commit is contained in:
Olivier Houchard 2018-12-20 11:56:28 +01:00 committed by Willy Tarreau
parent 15685c7912
commit f29cd5c8a8

View 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;