From 41a985c12bde2f3813c3c94b7f4e9542eb9fdf0e Mon Sep 17 00:00:00 2001 From: Vladimir Homutov Date: Fri, 16 Sep 2016 15:13:24 +0300 Subject: [PATCH] Upstream hash: fixed missing upstream name initialization. --- src/http/modules/ngx_http_upstream_hash_module.c | 1 + src/stream/ngx_stream_upstream_hash_module.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/http/modules/ngx_http_upstream_hash_module.c b/src/http/modules/ngx_http_upstream_hash_module.c index 1e2e05cb4..bb96166b2 100644 --- a/src/http/modules/ngx_http_upstream_hash_module.c +++ b/src/http/modules/ngx_http_upstream_hash_module.c @@ -571,6 +571,7 @@ ngx_http_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data) 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 --git a/src/stream/ngx_stream_upstream_hash_module.c b/src/stream/ngx_stream_upstream_hash_module.c index 88185eb05..605eea713 100644 --- a/src/stream/ngx_stream_upstream_hash_module.c +++ b/src/stream/ngx_stream_upstream_hash_module.c @@ -572,6 +572,7 @@ ngx_stream_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data) 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; }