diff options
author | Ruslan Ermilov <ru@nginx.com> | 2013-03-25 14:51:44 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2013-03-25 14:51:44 +0000 |
commit | ea327f13f130be87cf3023e215d1c97b5465343f (patch) | |
tree | c04a20d5e87d6d56a771414035072be9b38f2254 /src | |
parent | 4d9fdd86f7163286e9423b37954ac3e79385c3ff (diff) | |
download | nginx-ea327f13f130be87cf3023e215d1c97b5465343f.tar.gz nginx-ea327f13f130be87cf3023e215d1c97b5465343f.zip |
Upstream: removed rudiments of upstream connection caching.
This functionality is now provided by ngx_http_upstream_keepalive_module.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_upstream_round_robin.c | 21 | ||||
-rw-r--r-- | src/http/ngx_http_upstream_round_robin.h | 2 |
2 files changed, 0 insertions, 23 deletions
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c index d1331f4f8..d786ed142 100644 --- a/src/http/ngx_http_upstream_round_robin.c +++ b/src/http/ngx_http_upstream_round_robin.c @@ -373,7 +373,6 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data) ngx_int_t rc; ngx_uint_t i, n; - ngx_connection_t *c; ngx_http_upstream_rr_peer_t *peer; ngx_http_upstream_rr_peers_t *peers; @@ -382,26 +381,6 @@ ngx_http_upstream_get_round_robin_peer(ngx_peer_connection_t *pc, void *data) /* ngx_lock_mutex(rrp->peers->mutex); */ - if (rrp->peers->last_cached) { - - /* cached connection */ - - c = rrp->peers->cached[rrp->peers->last_cached]; - rrp->peers->last_cached--; - - /* ngx_unlock_mutex(ppr->peers->mutex); */ - -#if (NGX_THREADS) - c->read->lock = c->read->own_lock; - c->write->lock = c->write->own_lock; -#endif - - pc->connection = c; - pc->cached = 1; - - return NGX_OK; - } - pc->cached = 0; pc->connection = NULL; diff --git a/src/http/ngx_http_upstream_round_robin.h b/src/http/ngx_http_upstream_round_robin.h index 3f8cbf87f..ea90ab918 100644 --- a/src/http/ngx_http_upstream_round_robin.h +++ b/src/http/ngx_http_upstream_round_robin.h @@ -42,10 +42,8 @@ typedef struct ngx_http_upstream_rr_peers_s ngx_http_upstream_rr_peers_t; struct ngx_http_upstream_rr_peers_s { ngx_uint_t number; - ngx_uint_t last_cached; /* ngx_mutex_t *mutex; */ - ngx_connection_t **cached; ngx_uint_t total_weight; |