# HG changeset patch # User Roman Arutyunyan # Date 1400838425 -14400 # Node ID a2bf26774cd360fd1cb882fe89e3af93355110a2 # Parent d5b8ee9f2201e1d9fa7ac41da9a4a8d939cd42b1 Upstream: fix tries check in ip_hash. Make two checks for maximum number of tries consistent. The other one checks '>' condition. diff --git a/src/http/modules/ngx_http_upstream_ip_hash_module.c b/src/http/modules/ngx_http_upstream_ip_hash_module.c --- 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); } }