From: Willy Tarreau Date: Sat, 16 Aug 2008 16:41:13 +0000 (+0200) Subject: [BUG] maintain_proxies must not disable backends X-Git-Tag: v1.3.16-rc1~195 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5382b4aaa099ce5ce2af5828bd4d6dc38e9e8ea;p=thirdparty%2Fhaproxy.git [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. --- diff --git a/src/proxy.c b/src/proxy.c index 17728f5ac0..0554033572 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -314,7 +314,7 @@ void maintain_proxies(int *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);