diff options
| author | Willy Tarreau <w@1wt.eu> | 2008-08-16 18:41:13 +0200 |
|---|---|---|
| committer | Willy Tarreau <w@1wt.eu> | 2008-09-02 11:13:46 +0200 |
| commit | 3191fc8d0e3744a78204c05e8d6e8a83a5cf7f0e (patch) | |
| tree | 575799b5fe34eb45d9b0cd14ba56b90b974c61cd | |
| parent | e7ed3e14a8b3a52fe5286a1796f946799aa8a460 (diff) | |
| download | haproxy-3191fc8d0e3744a78204c05e8d6e8a83a5cf7f0e.tar.gz | |
[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)
| -rw-r--r-- | src/proxy.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
