details: http://hg.nginx.org/nginx/rev/a2bf26774cd3 branches: changeset: 5706:a2bf26774cd3 user: Roman Arutyunyan <a...@nginx.com> date: Fri May 23 13:47:05 2014 +0400 description: Upstream: fix tries check in ip_hash.
Make two checks for maximum number of tries consistent. The other one checks '>' condition. diffstat: src/http/modules/ngx_http_upstream_ip_hash_module.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r d5b8ee9f2201 -r a2bf26774cd3 src/http/modules/ngx_http_upstream_ip_hash_module.c --- a/src/http/modules/ngx_http_upstream_ip_hash_module.c Thu May 22 00:16:17 2014 +0400 +++ b/src/http/modules/ngx_http_upstream_ip_hash_module.c Fri May 23 13:47:05 2014 +0400 @@ -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); } } _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel