fix 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
index 43c2a50..d2a8947 100644
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -514,7 +514,7 @@
         }
 
         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 {