# HG changeset patch # User Maxim Dounin # Date 1316980836 0 # Node ID 114e3a7c3b8d3804bcb9f5b3e9aae692da4c87a4 # Parent 7b632622ba566e24a85f195a28018981fe4abc78 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 -r 7b632622ba56 -r 114e3a7c3b8d src/http/ngx_http_upstream.c --- 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