mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MEDIUM: h2: Make sure we're not already in the send_list in h2_subscribe().
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.
This commit is contained in:
parent
0e0793715c
commit
9a0f559676
@ -5150,7 +5150,8 @@ static int h2_subscribe(struct conn_stream *cs, int event_type, void *param)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user