From 7ecb6f10a480ebcaaf03876558f103f717fb8485 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 18 Dec 2018 16:39:21 +0100 Subject: [PATCH] BUG/MEDIUM: mux-h2: make sure to report synchronous errors after EOS If EOS has already been reported on the conn_stream, there won't be any read anymore to turn ERR_PENDING into ERROR, so we have to do report it directly. No backport is needed. --- src/mux_h2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mux_h2.c b/src/mux_h2.c index 58a052174..4c494d565 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1739,7 +1739,11 @@ static int h2c_handle_rst_stream(struct h2c *h2c, struct h2s *h2s) h2s_close(h2s); if (h2s->cs) { - h2s->cs->flags |= CS_FL_REOS | CS_FL_ERR_PENDING; + if (h2s->cs->flags & CS_FL_EOS) + h2s->cs->flags |= CS_FL_ERROR; + else + h2s->cs->flags |= CS_FL_REOS | CS_FL_ERR_PENDING; + if (h2s->recv_wait) { struct wait_event *sw = h2s->recv_wait;