use real weight, do not downground to one
This commit is contained in:
parent
531115412f
commit
ad8723ae80
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++) {
|
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;
|
peer[i].current_weight += peer[i].weight;
|
||||||
|
|
||||||
} else {
|
|
||||||
/* 1 allows to go to quick recovery when all peers failed */
|
|
||||||
peer[i].current_weight = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue