mirror of
https://github.com/nginx/nginx.git
synced 2026-05-28 04:12:47 -04:00
use real weight, do not downground to one
This commit is contained in:
parent
2517eef67b
commit
ab18bf2f02
1 changed files with 1 additions and 7 deletions
|
|
@ -511,13 +511,7 @@ ngx_http_upstream_get_peer(ngx_http_upstream_rr_peers_t *peers)
|
|||
}
|
||||
|
||||
for (i = 0; i < peers->number; i++) {
|
||||
if (peer[i].max_fails == 0 || peer[i].fails < peer[i].max_fails) {
|
||||
peer[i].current_weight += peer[i].weight;
|
||||
|
||||
} else {
|
||||
/* 1 allows to go to quick recovery when all peers failed */
|
||||
peer[i].current_weight = 1;
|
||||
}
|
||||
peer[i].current_weight += peer[i].weight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue