diff options
author | Vladimir Homutov <vl@nginx.com> | 2016-09-16 15:13:24 +0300 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2016-09-16 15:13:24 +0300 |
commit | f8a9d528df92c7634088e575e5c3d63a1d4ab8ea (patch) | |
tree | 9f2bd2c7374c38afb443e5e4b2a76e3512da5c4e /src | |
parent | 7f57804fe2573dd45dfac4fd79d70e616a760c53 (diff) | |
download | nginx-f8a9d528df92c7634088e575e5c3d63a1d4ab8ea.tar.gz nginx-f8a9d528df92c7634088e575e5c3d63a1d4ab8ea.zip |
Upstream hash: fixed missing upstream name initialization.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_upstream_hash_module.c | 1 | ||||
-rw-r--r-- | src/stream/ngx_stream_upstream_hash_module.c | 1 |
2 files changed, 2 insertions, 0 deletions
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; } |