fix r1464: test max fails in correct peer

This commit is contained in:
Igor Sysoev 2007-10-01 14:45:31 +00:00
parent 6669702b00
commit 834e447234

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