diff src/http/modules/ngx_http_upstream_least_conn_module.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/modules/ngx_http_upstream_least_conn_module.c
+++ b/src/http/modules/ngx_http_upstream_least_conn_module.c
@@ -353,10 +353,6 @@ ngx_http_upstream_free_least_conn_peer(n
         return;
     }
 
-    if (state == 0 && pc->tries == 0) {
-        return;
-    }
-
     lcp->conns[lcp->rrp.current]--;
 
     lcp->free_rr_peer(pc, &lcp->rrp, state);