diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 5795d53324..a9d874929e 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 5da9b569c7..b0f742c852 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 f4b780d0cd..fdf926f080 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 */