BUG/MEDIUM: h2: Make sure we're not in the send list on flow control.
If we can't send data for a stream because of its flow control, make sure
not to put it in the send_list, until the flow control lets it send again.
This is specific to 1.9, and should not be backported.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 568168f..fee3d53 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -1473,7 +1473,9 @@
h2s->mws += inc;
if (h2s->mws > 0 && (h2s->flags & H2_SF_BLK_SFCTL)) {
h2s->flags &= ~H2_SF_BLK_SFCTL;
- /* The task will be waken up later */
+ if (h2s->send_wait)
+ LIST_ADDQ(&h2c->send_list, &h2s->list);
+
}
}
else {
@@ -3393,6 +3395,10 @@
if (size <= 0) {
h2s->flags |= H2_SF_BLK_SFCTL;
+ if (h2s->send_wait) {
+ LIST_DEL(&h2s->list);
+ LIST_INIT(&h2s->list);
+ }
goto end;
}