mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Allow the load balancing method to "create" workers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@774400 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -940,6 +940,13 @@ static int proxy_handler(request_rec *r)
|
||||
balancer = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Initialise worker if needed, note the shared area must be initialized by the balancer logic */
|
||||
if (balancer) {
|
||||
ap_proxy_initialize_worker(worker, r->server, conf->pool);
|
||||
ap_proxy_initialize_worker_share(conf, worker, r->server);
|
||||
}
|
||||
|
||||
if (balancer && balancer->max_attempts_set && !max_attempts)
|
||||
max_attempts = balancer->max_attempts;
|
||||
/* firstly, try a proxy, unless a NoProxy directive is active */
|
||||
@@ -2295,7 +2302,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
|
||||
worker = (proxy_worker *)conf->workers->elts;
|
||||
for (i = 0; i < conf->workers->nelts; i++) {
|
||||
ap_proxy_initialize_worker_share(conf, worker, s);
|
||||
ap_proxy_initialize_worker(worker, s);
|
||||
ap_proxy_initialize_worker(worker, s, p);
|
||||
worker++;
|
||||
}
|
||||
/* Create and initialize forward worker if defined */
|
||||
@@ -2305,7 +2312,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
|
||||
conf->forward->hostname = "*";
|
||||
conf->forward->scheme = "*";
|
||||
ap_proxy_initialize_worker_share(conf, conf->forward, s);
|
||||
ap_proxy_initialize_worker(conf->forward, s);
|
||||
ap_proxy_initialize_worker(conf->forward, s, p);
|
||||
/* Do not disable worker in case of errors */
|
||||
conf->forward->s->status |= PROXY_WORKER_IGNORE_ERRORS;
|
||||
/* Disable address cache for generic forward worker */
|
||||
@@ -2317,7 +2324,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
|
||||
reverse->hostname = "*";
|
||||
reverse->scheme = "*";
|
||||
ap_proxy_initialize_worker_share(conf, reverse, s);
|
||||
ap_proxy_initialize_worker(reverse, s);
|
||||
ap_proxy_initialize_worker(reverse, s, p);
|
||||
/* Do not disable worker in case of errors */
|
||||
reverse->s->status |= PROXY_WORKER_IGNORE_ERRORS;
|
||||
/* Disable address cache for generic reverse worker */
|
||||
|
Reference in New Issue
Block a user