Upstream hash: fixed missing upstream name initialization.

This commit is contained in:
Vladimir Homutov 2016-09-16 15:13:24 +03:00
parent eb3bb4df85
commit 41a985c12b
2 changed files with 2 additions and 0 deletions

View file

@ -571,6 +571,7 @@ ngx_http_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
hp->tries++; hp->tries++;
if (hp->tries >= points->number) { if (hp->tries >= points->number) {
pc->name = hp->rrp.peers->name;
ngx_http_upstream_rr_peers_unlock(hp->rrp.peers); ngx_http_upstream_rr_peers_unlock(hp->rrp.peers);
return NGX_BUSY; return NGX_BUSY;
} }

View file

@ -572,6 +572,7 @@ ngx_stream_upstream_get_chash_peer(ngx_peer_connection_t *pc, void *data)
hp->tries++; hp->tries++;
if (hp->tries >= points->number) { if (hp->tries >= points->number) {
pc->name = hp->rrp.peers->name;
ngx_stream_upstream_rr_peers_unlock(hp->rrp.peers); ngx_stream_upstream_rr_peers_unlock(hp->rrp.peers);
return NGX_BUSY; return NGX_BUSY;
} }