From 5d45af698c8a4924616f5a6ce2f5742a18f84217 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Tue, 13 Dec 2011 18:30:15 +0000 Subject: 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. --- src/http/ngx_http_upstream.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/http/ngx_http_upstream.c') 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 -- cgit