changeset 5706:a2bf26774cd3

Upstream: fix tries check in ip_hash. Make two checks for maximum number of tries consistent. The other one checks '>' condition.
author Roman Arutyunyan <arut@nginx.com>
date Fri, 23 May 2014 13:47:05 +0400
parents d5b8ee9f2201
children 31dd63dcb9ea
files src/http/modules/ngx_http_upstream_ip_hash_module.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_upstream_ip_hash_module.c
+++ b/src/http/modules/ngx_http_upstream_ip_hash_module.c
@@ -231,7 +231,7 @@ ngx_http_upstream_get_ip_hash_peer(ngx_p
 
     next:
 
-        if (++iphp->tries >= 20) {
+        if (++iphp->tries > 20) {
             return iphp->get_rr_peer(pc, &iphp->rrp);
         }
     }