From: Maxim Dounin Date: Tue, 13 Dec 2011 18:30:15 +0000 (+0000) Subject: Merge of r4144: X-Git-Tag: release-1.0.11~20 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=5d45af698c8a4924616f5a6ce2f5742a18f84217;p=nginx.git Merge of r4144: 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 5aa96a425..7fba19faf 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2888,6 +2888,7 @@ ngx_http_upstream_next(ngx_http_request_t *r, ngx_http_upstream_t *u, #endif ngx_close_connection(u->peer.connection); + u->peer.connection = NULL; } #if 0