From: Willy Tarreau Date: Tue, 18 Dec 2018 15:39:21 +0000 (+0100) Subject: BUG/MEDIUM: mux-h2: make sure to report synchronous errors after EOS X-Git-Tag: v1.9.0~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ecb6f10a480ebcaaf03876558f103f717fb8485;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 58a0521742..4c494d565a 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;