From 3191fc8d0e3744a78204c05e8d6e8a83a5cf7f0e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sat, 16 Aug 2008 18:41:13 +0200 Subject: [PATCH] [BUG] maintain_proxies must not disable backends maintain_proxies could disable backends (p->maxconn == 0) which is wrong (but apparently harmless). Add a check for p->maxconn == 0. (cherry picked from commit d5382b4aaa099ce5ce2af5828bd4d6dc38e9e8ea) (cherry picked from commit 2f9127b4b91de1ac685498e145f29342115bcb71) --- src/proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proxy.c b/src/proxy.c index 7019606f0..83ef1d599 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -279,7 +279,7 @@ void maintain_proxies(struct timeval *next) /* if there are enough free sessions, we'll activate proxies */ if (actconn < global.maxconn) { while (p) { - if (p->feconn < p->maxconn) { + if (!p->maxconn || p->feconn < p->maxconn) { if (p->state == PR_STIDLE) { for (l = p->listen; l != NULL; l = l->next) enable_listener(l);