From: Olivier Houchard Date: Fri, 28 Dec 2018 13:44:41 +0000 (+0100) Subject: BUG/MEDIUM: mux_h2: Don't add to the idle list if we're full. X-Git-Tag: v2.0-dev1~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=855ac25d8293718ce2054b2b51a4c60bdf71cee4;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: mux_h2: Don't add to the idle list if we're full. In h2_detach(), don't add the connection to the idle list if nb_streams is at the max. This can happen if we already closed that stream before, so its slot became available and was used by another stream. This should be backported to 1.9. --- diff --git a/src/mux_h2.c b/src/mux_h2.c index 1906d58530..3786d03209 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -2970,7 +2970,7 @@ static void h2_detach(struct conn_stream *cs) /* Never ever allow to reuse a connection from a non-reuse backend */ if ((h2c->proxy->options & PR_O_REUSE_MASK) == PR_O_REUSE_NEVR) h2c->conn->flags |= CO_FL_PRIVATE; - if (LIST_ISEMPTY(&h2c->conn->list)) { + if (LIST_ISEMPTY(&h2c->conn->list) && h2c->nb_streams < h2_settings_max_concurrent_streams) { struct server *srv = objt_server(h2c->conn->target); if (srv) {