]> git.kaiwu.me - nginx.git/commitdiff
avoid endless loop
authorIgor Sysoev <igor@sysoev.ru>
Tue, 6 Mar 2007 11:02:35 +0000 (11:02 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 6 Mar 2007 11:02:35 +0000 (11:02 +0000)
src/http/modules/ngx_http_upstream_ip_hash_module.c

index e0cf8afc1030c7f28c9518a65341f1f342e0a833..87e5ac4d2ec94c14014cfcaabda3d76246b49520 100644 (file)
@@ -179,11 +179,10 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
                     peer->fails = 0;
                     break;
                 }
-
-            } else {
-                iphp->rrp.tried[n] |= m;
             }
 
+            iphp->rrp.tried[n] |= m;
+
             /* ngx_unlock_mutex(iphp->rrp.peers->mutex); */
 
             pc->tries--;