From: Willy Tarreau Date: Wed, 19 Dec 2018 16:44:55 +0000 (+0100) Subject: BUG/MEDIUM: mux-h2: make use of h2s_alert() to report aborts X-Git-Tag: v1.9.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f830f018cfdb7c795c7c60407e5f766f7a77a417;p=thirdparty%2Fhaproxy.git 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 11f1a6c594..aef6d38049 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1313,13 +1313,7 @@ static void h2_wake_some_streams(struct h2c *h2c, int last, uint32_t flags) 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 @@ static int h2c_handle_rst_stream(struct h2c *h2c, struct h2s *h2s) 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;