]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MEDIUM] listeners: don't stop proxies when global maxconn is reached
authorWilly Tarreau <w@1wt.eu>
Mon, 25 Jul 2011 05:08:45 +0000 (07:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 Jul 2011 05:08:45 +0000 (07:08 +0200)
Now we don't have to stop proxies anymore since their listeners will be
queued if they attempt to accept a connection past the global limits.

src/proxy.c

index 25398a966bc59cf3913450ed6266086d43767fab..2be137070e70b7253cfdacd3ed1830d9efa5f243 100644 (file)
@@ -482,6 +482,10 @@ void maintain_proxies(int *next)
 
        /* if there are enough free sessions, we'll activate proxies */
        if (actconn < global.maxconn) {
+               /* We should periodically try to enable listeners waiting for a
+                * global resource here.
+                */
+
                for (; p; p = p->next) {
                        /* check the various reasons we may find to block the frontend */
                        if (p->feconn >= p->maxconn)
@@ -519,16 +523,6 @@ void maintain_proxies(int *next)
                        }
                }
        }
-       else {  /* block all proxies */
-               while (p) {
-                       if (p->state == PR_STRUN) {
-                               for (l = p->listen; l != NULL; l = l->next)
-                                       disable_listener(l);
-                               p->state = PR_STIDLE;
-                       }
-                       p = p->next;
-               }
-       }
 
        if (stopping) {
                struct peers *prs;