httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r451575 - in /httpd/httpd/trunk/modules/proxy: mod_proxy.c mod_proxy.h proxy_util.c
Date Sat, 30 Sep 2006 10:41:51 GMT
Author: mturk
Date: Sat Sep 30 03:41:51 2006
New Revision: 451575

URL: http://svn.apache.org/viewvc?view=rev&rev=451575
Log:
Enable retry=0 for the worker.
This allows to have an option to always retry
the workers in error state instead using a
specified time.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy.c
    httpd/httpd/trunk/modules/proxy/mod_proxy.h
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?view=diff&rev=451575&r1=451574&r2=451575
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Sat Sep 30 03:41:51 2006
@@ -85,9 +85,10 @@
          * in error state, it will be retried after that timeout.
          */
         ival = atoi(val);
-        if (ival < 1)
-            return "Retry must be at least one second";
+        if (ival < 0)
+            return "Retry must be a positive value";
         worker->retry = apr_time_from_sec(ival);
+        worker->retry_set = 1;
     }
     else if (!strcasecmp(key, "ttl")) {
         /* Time in seconds that will destroy all the connections

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.h?view=diff&rev=451575&r1=451574&r2=451575
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.h (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.h Sat Sep 30 03:41:51 2006
@@ -296,6 +296,7 @@
 struct proxy_worker {
     int             id;         /* scoreboard id */
     apr_interval_time_t retry;  /* retry interval */
+    char            retry_set;
     int             lbfactor;   /* initial load balancing factor */
     const char      *name;
     const char      *scheme;    /* scheme to use ajp|http|https */

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?view=diff&rev=451575&r1=451574&r2=451575
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Sat Sep 30 03:41:51 2006
@@ -1780,7 +1780,7 @@
     }
 
     /* Set default parameters */
-    if (!worker->retry) {
+    if (!worker->retry_set) {
         worker->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
     }
     /* By default address is reusable */



Mime
View raw message