aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_upstream_least_conn_module.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2014-09-12 18:50:46 +0400
committerRoman Arutyunyan <arut@nginx.com>2014-09-12 18:50:46 +0400
commitcfc3db1972f1eb96accaf4c04095912e176aecd3 (patch)
tree3168179016a3a1c1bf721dbd88ed6dc9ca08f771 /src/http/modules/ngx_http_upstream_least_conn_module.c
parent4c7e1a8d85059327848e091beeadd71c079ed1d6 (diff)
downloadnginx-cfc3db1972f1eb96accaf4c04095912e176aecd3.tar.gz
nginx-cfc3db1972f1eb96accaf4c04095912e176aecd3.zip
Upstream: included backup peers into peer.tries.
Since peer.tries is never reset it can now be limited if required.
Diffstat (limited to 'src/http/modules/ngx_http_upstream_least_conn_module.c')
-rw-r--r--src/http/modules/ngx_http_upstream_least_conn_module.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/http/modules/ngx_http_upstream_least_conn_module.c b/src/http/modules/ngx_http_upstream_least_conn_module.c
index dbef95d41..623bc9b10 100644
--- a/src/http/modules/ngx_http_upstream_least_conn_module.c
+++ b/src/http/modules/ngx_http_upstream_least_conn_module.c
@@ -299,10 +299,6 @@ ngx_http_upstream_get_least_conn_peer(ngx_peer_connection_t *pc, void *data)
lcp->rrp.tried[n] |= m;
lcp->conns[p]++;
- if (pc->tries == 1 && peers->next) {
- pc->tries += peers->next->number;
- }
-
return NGX_OK;
failed:
@@ -314,7 +310,6 @@ failed:
lcp->conns += peers->number;
lcp->rrp.peers = peers->next;
- pc->tries = lcp->rrp.peers->number;
n = (lcp->rrp.peers->number + (8 * sizeof(uintptr_t) - 1))
/ (8 * sizeof(uintptr_t));