From 834e447234c60812036c77cb78c0fbcfeee7eb5c Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 1 Oct 2007 14:45:31 +0000 Subject: [PATCH] fix r1464: test max fails in correct peer --- src/http/ngx_http_upstream_round_robin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c index 43c2a50f1..d2a894799 100644 --- 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_upstream_rr_peers_t *peers) } 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; } else {