mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-31 17:12:05 +00:00
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.
This commit is contained in:
parent
8b2757c339
commit
f830f018cf
16
src/mux_h2.c
16
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;
|
||||
|
Loading…
Reference in New Issue
Block a user