From: Roman Arutyunyan Date: Fri, 23 May 2014 09:47:05 +0000 (+0400) Subject: Upstream: fix tries check in ip_hash. X-Git-Tag: release-1.7.1~5 X-Git-Url: http://git.kaiwu.me/sitemap.xml?a=commitdiff_plain;h=3e279a8eb492ff903ccc46cf03bbd95a30a7dcf1;p=nginx.git 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 index 041883fec..148d73a84 100644 --- 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_peer_connection_t *pc, void *data) next: - if (++iphp->tries >= 20) { + if (++iphp->tries > 20) { return iphp->get_rr_peer(pc, &iphp->rrp); } }