changeset 4348:6af89b1b16e8 stable-1.0

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 13 Dec 2011 18:30:15 +0000
parents 4d45c138e3df
children e04fdb54dd71
files src/http/ngx_http_upstream.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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_
 #endif
 
         ngx_close_connection(u->peer.connection);
+        u->peer.connection = NULL;
     }
 
 #if 0