changeset 1556:3dc408adbb70

fix r1552 and r1464: test max fails in correct peer
author Igor Sysoev <igor@sysoev.ru>
date Tue, 02 Oct 2007 12:34:16 +0000
parents 76fe59c6fafb
children 9d094e581587
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[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 {