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.
(cherry picked from commit
10d5c3172b366e48b5851a20de9b68f0d5495b92)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
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 */
HA_SPIN_LOCK(OTHER_LOCK, &idle_conn_srv_lock);
for (i = tid;;) {