BUG/MEDIUM: mux-h2: report no available stream on a connection having errors
If an H2 mux has met an error, we must not report available streams
anymore, or it risks to accumulate new streams while not being able
to process them.
This should be backported to 2.0 and 1.9.
(cherry picked from commit c61966f9b468b72528f854f4bc64bb5934751384)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 8116df4..2b87a52 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -507,6 +507,9 @@
if (h2c->last_sid >= 0)
return 0;
+ if (h2c->st0 >= H2_CS_ERROR)
+ return 0;
+
/* note: may be negative if a SETTINGS frame changes the limit */
ret1 = h2c->streams_limit - h2c->nb_streams;