changeset 1551:9ea31a2eab27

fix r1464: test max fails in correct peer
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Oct 2007 14:45:31 +0000
parents d0bdd5f2276e
children f045c67ab622
files src/http/ngx_http_upstream_round_robin.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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->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 {