From 3e279a8eb492ff903ccc46cf03bbd95a30a7dcf1 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Fri, 23 May 2014 13:47:05 +0400 Subject: Upstream: fix tries check in ip_hash. Make two checks for maximum number of tries consistent. The other one checks '>' condition. --- src/http/modules/ngx_http_upstream_ip_hash_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/http/modules') 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); } } -- cgit