# 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 --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- 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