From: Mladen Turk Date: Sat, 30 Sep 2006 10:41:51 +0000 (+0000) Subject: Enable retry=0 for the worker. X-Git-Tag: 2.3.0~2106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a68c112dceae26d7a9faddc7837705af736ee81;p=thirdparty%2Fapache%2Fhttpd.git 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@451575 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 5795d533247..a9d874929ea 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -85,9 +85,10 @@ static const char *set_worker_param(apr_pool_t *p, * 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 diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index 5da9b569c7b..b0f742c8525 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -296,6 +296,7 @@ typedef struct { 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 */ diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index f4b780d0cda..fdf926f0801 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1780,7 +1780,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser } /* 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 */