]> git.kaiwu.me - nginx.git/commitdiff
Upstream: fix tries check in ip_hash.
authorRoman Arutyunyan <arut@nginx.com>
Fri, 23 May 2014 09:47:05 +0000 (13:47 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Fri, 23 May 2014 09:47:05 +0000 (13:47 +0400)
Make two checks for maximum number of tries consistent.
The other one checks '>' condition.

src/http/modules/ngx_http_upstream_ip_hash_module.c

index 041883fec8299997412d451393c469899ac5a676..148d73a84727aa558865da2e86aa7568307cea30 100644 (file)
@@ -231,7 +231,7 @@ ngx_http_upstream_get_ip_hash_peer(ngx_peer_connection_t *pc, void *data)
 
     next:
 
-        if (++iphp->tries >= 20) {
+        if (++iphp->tries > 20) {
             return iphp->get_rr_peer(pc, &iphp->rrp);
         }
     }