BUG/MEDIUM: mux-h2: make use of h2s_alert() to report aborts
If we had no pending read, it could be complicated to report an
RST_STREAM to a sender since we used to only report it via the
rx side if subscribed. Similarly in h2_wake_some_streams() we
now try all methods, hoping to catch all possible events.
No backport is needed.
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 11f1a6c..aef6d38 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -1313,13 +1313,7 @@
if ((flags & CS_FL_ERR_PENDING) && (h2s->cs->flags & CS_FL_EOS))
h2s->cs->flags |= CS_FL_ERROR;
- if (h2s->recv_wait) {
- struct wait_event *sw = h2s->recv_wait;
- sw->events &= ~SUB_RETRY_RECV;
- tasklet_wakeup(sw->task);
- h2s->recv_wait = NULL;
- } else if (h2s->cs->data_cb->wake != NULL)
- h2s->cs->data_cb->wake(h2s->cs);
+ h2s_alert(h2s);
if (flags & CS_FL_ERR_PENDING && h2s->st < H2_SS_ERROR)
h2s->st = H2_SS_ERROR;
@@ -1797,13 +1791,7 @@
else
h2s->cs->flags |= CS_FL_REOS | CS_FL_ERR_PENDING;
- if (h2s->recv_wait) {
- struct wait_event *sw = h2s->recv_wait;
-
- sw->events &= ~SUB_RETRY_RECV;
- tasklet_wakeup(sw->task);
- h2s->recv_wait = NULL;
- }
+ h2s_alert(h2s);
}
h2s->flags |= H2_SF_RST_RCVD;