1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

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
This commit is contained in:
Mladen Turk
2006-09-30 10:41:51 +00:00
parent f80b020c74
commit 6a68c112dc
3 changed files with 5 additions and 3 deletions

View File

@@ -85,9 +85,10 @@ static const char *set_worker_param(apr_pool_t *p,
* in error state, it will be retried after that timeout. * in error state, it will be retried after that timeout.
*/ */
ival = atoi(val); ival = atoi(val);
if (ival < 1) if (ival < 0)
return "Retry must be at least one second"; return "Retry must be a positive value";
worker->retry = apr_time_from_sec(ival); worker->retry = apr_time_from_sec(ival);
worker->retry_set = 1;
} }
else if (!strcasecmp(key, "ttl")) { else if (!strcasecmp(key, "ttl")) {
/* Time in seconds that will destroy all the connections /* Time in seconds that will destroy all the connections

View File

@@ -296,6 +296,7 @@ typedef struct {
struct proxy_worker { struct proxy_worker {
int id; /* scoreboard id */ int id; /* scoreboard id */
apr_interval_time_t retry; /* retry interval */ apr_interval_time_t retry; /* retry interval */
char retry_set;
int lbfactor; /* initial load balancing factor */ int lbfactor; /* initial load balancing factor */
const char *name; const char *name;
const char *scheme; /* scheme to use ajp|http|https */ const char *scheme; /* scheme to use ajp|http|https */

View File

@@ -1780,7 +1780,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
} }
/* Set default parameters */ /* Set default parameters */
if (!worker->retry) { if (!worker->retry_set) {
worker->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY); worker->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
} }
/* By default address is reusable */ /* By default address is reusable */