]> granicus.if.org Git - apache/commitdiff
Allow for the smax param to be 0, so that all connections
authorJim Jagielski <jim@apache.org>
Fri, 19 Sep 2008 13:43:48 +0000 (13:43 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 19 Sep 2008 13:43:48 +0000 (13:43 +0000)
are available to be dropped, should they be idle long
enough.
PR 43371

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@697093 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy.c
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index eaf549230eb85d31b50800df990d982e784fd37d..2b2a7afbfb320554c617f7a9cc5d077bfc5fed73 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,11 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) Allow for smax to be 0 for balancer members so that all idle
+     connections are able to be dropped should they exceed ttl.
+     PR 43371 [Phil Endecott <spam_from_apache_bugzilla chezphil.org>,
+     Jim Jagielski]
+
   *) mod_proxy_ajp: Fix wrongly formatted requests where client
      sets Content-Length header, but doesn't provide a body.
      Servlet container always expects that next packet is
index 1b2573ac3dc72d0bbb54ebf054abeae9ab6861c9..4eef8763eb9f1e868523bc7bf5da36f42990a155 100644 (file)
@@ -98,7 +98,7 @@ static const char *set_worker_param(apr_pool_t *p,
     }
     else if (!strcasecmp(key, "ttl")) {
         /* Time in seconds that will destroy all the connections
-         * that exced the smax
+         * that exceed the smax
          */
         ival = atoi(val);
         if (ival < 1)
index fd46206ebe37cb8f6b9b6cdf0c42fa8d16899424..1a150eafdd0a14d16784f9c97ee194935c39974b 100644 (file)
@@ -1435,6 +1435,7 @@ PROXY_DECLARE(const char *) ap_proxy_add_worker(proxy_worker **worker,
     (*worker)->id   = proxy_lb_workers;
     (*worker)->flush_packets = flush_off;
     (*worker)->flush_wait = PROXY_FLUSH_WAIT;
+    (*worker)->smax = -1;
     /* Increase the total worker count */
     proxy_lb_workers++;
     init_conn_pool(p, *worker);
@@ -1455,6 +1456,7 @@ PROXY_DECLARE(proxy_worker *) ap_proxy_create_worker(apr_pool_t *p)
     proxy_worker *worker;
     worker = (proxy_worker *)apr_pcalloc(p, sizeof(proxy_worker));
     worker->id = proxy_lb_workers;
+    worker->smax = -1;
     /* Increase the total worker count */
     proxy_lb_workers++;
     init_conn_pool(p, worker);
@@ -1920,7 +1922,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
         if (worker->hmax == 0 || worker->hmax > mpm_threads) {
             worker->hmax = mpm_threads;
         }
-        if (worker->smax == 0 || worker->smax > worker->hmax) {
+        if (worker->smax == -1 || worker->smax > worker->hmax) {
             worker->smax = worker->hmax;
         }
         /* Set min to be lower then smax */