fix r1552 and r1464: test max fails in correct peer

This commit is contained in:
Igor Sysoev 2007-10-02 12:34:16 +00:00
parent d13045f16c
commit a103646402

View File

@ -514,7 +514,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->max_fails) {
if (peer[i].max_fails == 0 || peer[i].fails < peer[i].max_fails) {
peer[i].current_weight += peer[i].weight;
} else {