Commit 9b318e93 authored by Mladen Turk's avatar Mladen Turk
Browse files

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
parent 42258822
Loading
Loading
Loading
Loading
+3 −2
Changes for modules/proxy/mod_proxy.c: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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
+1 −0
Changes for modules/proxy/mod_proxy.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Changes for modules/proxy/proxy_util.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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 */