[nginx] Upstream hash: fixed missing upstream name initialization.

Vladimir Homutov vl at nginx.com
Fri Sep 16 14:12:18 UTC 2016


details:   http://hg.nginx.org/nginx/rev/52367732bcbc
branches:  
changeset: 6697:52367732bcbc
user:      Vladimir Homutov <vl at nginx.com>
date:      Fri Sep 16 15:13:24 2016 +0300
description:
Upstream hash: fixed missing upstream name initialization.

diffstat:

 src/http/modules/ngx_http_upstream_hash_module.c |  1 +
 src/stream/ngx_stream_upstream_hash_module.c     |  1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r e83540f825cd -r 52367732bcbc src/http/modules/ngx_http_upstream_hash_module.c
--- a/src/http/modules/ngx_http_upstream_hash_module.c	Thu Sep 15 15:36:02 2016 +0300
+++ b/src/http/modules/ngx_http_upstream_hash_module.c	Fri Sep 16 15:13:24 2016 +0300
@@ -571,6 +571,7 @@ ngx_http_upstream_get_chash_peer(ngx_pee
         hp->tries++;
 
         if (hp->tries >= points->number) {
+            pc->name = hp->rrp.peers->name;
             ngx_http_upstream_rr_peers_unlock(hp->rrp.peers);
             return NGX_BUSY;
         }
diff -r e83540f825cd -r 52367732bcbc src/stream/ngx_stream_upstream_hash_module.c
--- a/src/stream/ngx_stream_upstream_hash_module.c	Thu Sep 15 15:36:02 2016 +0300
+++ b/src/stream/ngx_stream_upstream_hash_module.c	Fri Sep 16 15:13:24 2016 +0300
@@ -572,6 +572,7 @@ ngx_stream_upstream_get_chash_peer(ngx_p
         hp->tries++;
 
         if (hp->tries >= points->number) {
+            pc->name = hp->rrp.peers->name;
             ngx_stream_upstream_rr_peers_unlock(hp->rrp.peers);
             return NGX_BUSY;
         }



More information about the nginx-devel mailing list