summaryrefslogtreecommitdiff
path: root/modules/proxy/mod_proxy_balancer.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2011-12-27 19:42:33 +0100
committerStefan Fritsch <sf@sfritsch.de>2011-12-27 19:42:33 +0100
commitad14e19ad0400e289b06fb7728aea815e6ed49be (patch)
treebd29489cafb04b303940169ae7b00c1171a5a34c /modules/proxy/mod_proxy_balancer.c
parent02a0e3b89d2ea1b984365e692c910668d75c6dcd (diff)
downloadapache2-ad14e19ad0400e289b06fb7728aea815e6ed49be.tar.gz
Upstream tarball 2.2.12upstream/2.2.12
Diffstat (limited to 'modules/proxy/mod_proxy_balancer.c')
-rw-r--r--modules/proxy/mod_proxy_balancer.c16
1 files changed, 12 insertions, 4 deletions
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)) )