]> git.kaiwu.me - nginx.git/commitdiff
Upstream hash: fixed missing upstream name initialization.
authorVladimir Homutov <vl@nginx.com>
Fri, 16 Sep 2016 12:13:24 +0000 (15:13 +0300)
committerVladimir Homutov <vl@nginx.com>
Fri, 16 Sep 2016 12:13:24 +0000 (15:13 +0300)
src/http/modules/ngx_http_upstream_hash_module.c
src/stream/ngx_stream_upstream_hash_module.c

index 1e2e05cb43da873344e263cc512c6eb38af331f8..bb96166b27a910f197078e8a5f0b05ff5ad4668e 100644 (file)
@@ -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;
         }
index 88185eb0575281a96873e1cb496e79d7c8ba9c0c..605eea71328427853ded7cacfaa3ce3d49a57ee7 100644 (file)
@@ -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;
         }