mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
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.
This commit is contained in:
parent
e3c4192962
commit
10d5c3172b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user