  
      } else {
  
-@@ -356,6 +386,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
+@@ -334,6 +364,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
              peers->peer[i].current_weight = 0;
              peers->peer[i].max_fails = 1;
              peers->peer[i].fail_timeout = 10;

     }
 
     us->peer.data = peers;
@@ -323,6 +350,9 @@ ngx_http_upstream_create_round_robin_peer(ngx_http_request_t *r,
         peers->peer[0].current_weight = 0;
         peers->peer[0].max_fails = 1;
         peers->peer[0].fail_timeout = 10;

         }
     }
 
@@ -391,6 +424,12 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data)
             goto failed;
         }
 
