From: Maxim Dounin Date: Sun, 25 Sep 2011 20:00:36 +0000 (+0000) Subject: Upstream: clearing of u->peer.connection on close. X-Git-Tag: release-1.1.5~18 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=28b001f897e3d3dfdffe1cca811657dd36961605;p=nginx.git Upstream: clearing of u->peer.connection on close. This fixes crashes observed with some 3rd party balancer modules. Standard balancer modules (round-robin and ip hash) explicitly set pc->connection (aka u->peer.connection) to NULL and aren't affected. --- diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index ef16a662c..3d022c78f 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2927,6 +2927,7 @@ ngx_http_upstream_next(ngx_http_request_t *r, ngx_http_upstream_t *u, } ngx_close_connection(u->peer.connection); + u->peer.connection = NULL; } #if 0