In h2_subscribe(), don't add ourself to the send_list if we're already in it.
That may happen if we try to send and fail twice, as we're only removed
from the send_list if we managed to send data, to promote fairness.
Failing to do so can lead to either an infinite loop, or some random crashes,
as we'd get the same h2s in the send_list twice.
This should be backported to 1.9.
sw->events |= SUB_RETRY_SEND;
sw->handle = h2s;
h2s->send_wait = sw;
- if (!(h2s->flags & H2_SF_BLK_SFCTL)) {
+ if (!(h2s->flags & H2_SF_BLK_SFCTL) &&
+ LIST_ISEMPTY(&h2s->list)) {
if (h2s->flags & H2_SF_BLK_MFCTL)
LIST_ADDQ(&h2c->fctl_list, &h2s->list);
else