diff src/http/ngx_http_upstream.c @ 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 70e1ee2307f9
children 3549db8ceaf2
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c	Fri Sep 23 20:15:27 2011 +0000
+++ b/src/http/ngx_http_upstream.c	Sun Sep 25 20:00:36 2011 +0000
@@ -2927,6 +2927,7 @@
         }
 
         ngx_close_connection(u->peer.connection);
+        u->peer.connection = NULL;
     }
 
 #if 0