Skip to content

Commit 70d0d18

Browse files
Olivier Houchardwtarreau
authored andcommitted
BUG/MEDIUM: h2: Don't forget to set recv_wait_list to NULL in h2_detach.
If we're detaching the conn_stream, and it was subscribed to be waken up when more data was available to receive, unsubscribe it. No backport is needed.
1 parent 251f6a2 commit 70d0d18

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mux_h2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2606,6 +2606,9 @@ static void h2_detach(struct conn_stream *cs)
26062606
return;
26072607

26082608
h2c = h2s->h2c;
2609+
/* If the stream we're detaching waited for more data, unsubscribe it now */
2610+
if (h2s->recv_wait_list && !((long)h2s->recv_wait_list->handle & 3))
2611+
h2s->recv_wait_list = NULL;
26092612
h2s->cs = NULL;
26102613
h2c->nb_cs--;
26112614
if (h2c->flags & H2_CF_DEM_TOOMANY &&

0 commit comments

Comments
 (0)