mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
No need for each ind lb method to increment the elected
element. Do so from the main calling func. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@484783 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -293,6 +293,9 @@ static proxy_worker *find_best_worker(proxy_balancer *balancer,
|
||||
|
||||
candidate = (*balancer->lbmethod->finder)(balancer, r);
|
||||
|
||||
if (candidate)
|
||||
candidate->s->elected++;
|
||||
|
||||
/*
|
||||
PROXY_THREAD_UNLOCK(balancer);
|
||||
return NULL;
|
||||
@@ -976,7 +979,6 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
|
||||
|
||||
if (mycandidate) {
|
||||
mycandidate->s->lbstatus -= total_factor;
|
||||
mycandidate->s->elected++;
|
||||
}
|
||||
|
||||
return mycandidate;
|
||||
@@ -1055,10 +1057,6 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
|
||||
cur_lbset++;
|
||||
} while (cur_lbset <= max_lbset && !mycandidate);
|
||||
|
||||
if (mycandidate) {
|
||||
mycandidate->s->elected++;
|
||||
}
|
||||
|
||||
return mycandidate;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user