From: Amaury Denoyelle Date: Wed, 6 Jan 2021 13:28:51 +0000 (+0100) Subject: BUG/MINOR: srv: do not cleanup idle conns if pool max is null X-Git-Tag: v2.4-dev5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10d5c3172b366e48b5851a20de9b68f0d5495b92;p=thirdparty%2Fhaproxy.git BUG/MINOR: srv: do not cleanup idle conns if pool max is null If a server is configured to not have any idle conns, returns immediatly from srv_cleanup_connections. This avoids a segfault when a server is configured with pool-max-conn to 0. This should be backported up to 2.2. --- diff --git a/src/server.c b/src/server.c index def0127281..9463882fe0 100644 --- a/src/server.c +++ b/src/server.c @@ -5299,6 +5299,10 @@ static void srv_cleanup_connections(struct server *srv) int did_remove; int i; + /* nothing to do if pool-max-conn is null */ + if (!srv->max_idle_conns) + return; + /* check all threads starting with ours */ for (i = tid;;) { did_remove = 0;