# HG changeset patch # User Igor Sysoev # Date 1191328456 0 # Node ID 3dc408adbb704a90963e999143423b23d9c641a2 # Parent 76fe59c6fafb2422a5edf29c9fd49b82f02939c0 fix r1552 and r1464: test max fails in correct peer diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c @@ -514,7 +514,7 @@ ngx_http_upstream_get_peer(ngx_http_upst } 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 {