From ad14e19ad0400e289b06fb7728aea815e6ed49be Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Tue, 27 Dec 2011 19:42:33 +0100 Subject: Upstream tarball 2.2.12 --- modules/proxy/mod_proxy_balancer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'modules/proxy/mod_proxy_balancer.c') diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index c0dc2af9..e5a010db 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -406,7 +406,15 @@ static void force_recovery(proxy_balancer *balancer, server_rec *s) for (i = 0; i < balancer->workers->nelts; i++, worker++) { if (!(worker->s->status & PROXY_WORKER_IN_ERROR)) { ok = 1; - break; + break; + } + else { + /* Try if we can recover */ + ap_proxy_retry_worker("BALANCER", worker, s); + if (!(worker->s->status & PROXY_WORKER_IN_ERROR)) { + ok = 1; + break; + } } } if (!ok) { @@ -1006,7 +1014,7 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer, if (worker->s->lbset > max_lbset) max_lbset = worker->s->lbset; } - if (worker->s->lbset > cur_lbset) + if (worker->s->lbset != cur_lbset) continue; if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(worker) : PROXY_WORKER_IS_STANDBY(worker)) ) continue; @@ -1088,7 +1096,7 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer, if (worker->s->lbset > max_lbset) max_lbset = worker->s->lbset; } - if (worker->s->lbset > cur_lbset) + if (worker->s->lbset != cur_lbset) continue; if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(worker) : PROXY_WORKER_IS_STANDBY(worker)) ) continue; @@ -1158,7 +1166,7 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer, max_lbset = worker->s->lbset; } - if (worker->s->lbset > cur_lbset) + if (worker->s->lbset != cur_lbset) continue; if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(worker) : PROXY_WORKER_IS_STANDBY(worker)) ) -- cgit v1.2.3