changeset 4143:114e3a7c3b8d

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 Sun, 25 Sep 2011 20:00:36 +0000
parents 7b632622ba56
children 7b77428909ed
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
@@ -2927,6 +2927,7 @@ ngx_http_upstream_next(ngx_http_request_
         }
 
         ngx_close_connection(u->peer.connection);
+        u->peer.connection = NULL;
     }
 
 #if 0