From: Willy Tarreau Date: Tue, 6 Aug 2019 08:01:40 +0000 (+0200) Subject: BUG/MINOR: mux-h2: don't refrain from sending an RST_STREAM after another one X-Git-Tag: v2.1-dev2~233 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=231f61617014e54332cc743c73306506a56ab78e;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-h2: don't refrain from sending an RST_STREAM after another one The test in h2s_send_rst_stream() is excessive, it refrains from sending an RST_STREAM if *the last frame* was an RST_STREAM, regardless of the stream ID. In a context where both clients and servers abort a lot, it could happen that one RST_STREAM is dropped from responses from time to time, causing delays to the client. This must be backported to 2.0, 1.9 and 1.8. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 1d870610a8..f085e2b11c 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -1321,7 +1321,7 @@ static int h2s_send_rst_stream(struct h2c *h2c, struct h2s *h2s) /* RFC7540#5.4.2: To avoid looping, an endpoint MUST NOT send a * RST_STREAM in response to a RST_STREAM frame. */ - if (h2c->dft == H2_FT_RST_STREAM) { + if (h2c->dsi == h2s->id && h2c->dft == H2_FT_RST_STREAM) { ret = 1; goto ignore; }