Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: fix tries check in ip_hash.

Roman Arutyunyan
May 23, 2014 05:52AM
details: http://hg.nginx.org/nginx/rev/a2bf26774cd3
branches:
changeset: 5706:a2bf26774cd3
user: Roman Arutyunyan <arut@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
Subject Author Views Posted

[nginx] Upstream: fix tries check in ip_hash.

Roman Arutyunyan 695 May 23, 2014 05:52AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 221
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready