diff src/http/ngx_http_upstream_round_robin.c @ 5162:ee9a043765ea stable-1.2

Merge of r5133, r5134: peer.free() and peer.get() balance. *) Upstream: only call peer.free() if peer.get() selected a peer. *) Upstream: removed double-free workarounds in peer.free() methods.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 29 Mar 2013 18:16:27 +0000
parents ac3690ee6c28
children
line wrap: on
line diff
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -584,10 +584,6 @@ ngx_http_upstream_free_round_robin_peer(
     ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0,
                    "free rr peer %ui %ui", pc->tries, state);
 
-    if (state == 0 && pc->tries == 0) {
-        return;
-    }
-
     /* TODO: NGX_PEER_KEEPALIVE */
 
     if (rrp->peers->single) {