mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-08 16:23:24 -04: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
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Reference in a new issue