Mercurial > hg > nginx-quic
changeset 4656:90ddd4abfdd2
Upstream: least_conn compilation fixes.
Removed duplicate call of ngx_http_upstream_init_round_robin_peer()
overlooked during code changes. Rewritten "return lcp->free_rr_peer(...)"
as MSVC doesn't like it.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 04 Jun 2012 00:00:28 +0000 |
parents | 382c523d253a |
children | c070fa19511e |
files | src/http/modules/ngx_http_upstream_least_conn_module.c |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_upstream_least_conn_module.c +++ b/src/http/modules/ngx_http_upstream_least_conn_module.c @@ -122,7 +122,6 @@ static ngx_int_t ngx_http_upstream_init_least_conn_peer(ngx_http_request_t *r, ngx_http_upstream_srv_conf_t *us) { - ngx_int_t rc; ngx_http_upstream_lc_peer_data_t *lcp; ngx_http_upstream_least_conn_conf_t *lcf; @@ -141,8 +140,6 @@ ngx_http_upstream_init_least_conn_peer(n r->upstream->peer.data = &lcp->rrp; - rc = ngx_http_upstream_init_round_robin_peer(r, us); - if (ngx_http_upstream_init_round_robin_peer(r, us) != NGX_OK) { return NGX_ERROR; } @@ -350,7 +347,8 @@ ngx_http_upstream_free_least_conn_peer(n "free least conn peer %ui %ui", pc->tries, state); if (lcp->rrp.peers->single) { - return lcp->free_rr_peer(pc, &lcp->rrp, state); + lcp->free_rr_peer(pc, &lcp->rrp, state); + return; } if (state == 0 && pc->tries == 0) { @@ -359,7 +357,7 @@ ngx_http_upstream_free_least_conn_peer(n lcp->conns[lcp->rrp.current]--; - return lcp->free_rr_peer(pc, &lcp->rrp, state); + lcp->free_rr_peer(pc, &lcp->rrp, state); }