# HG changeset patch # User Maxim Dounin # Date 1323801015 0 # Node ID 6af89b1b16e816d60e95b195eac30beb44849d5c # Parent 4d45c138e3dfc9ded075d43014a8defd7439e51d 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. 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 @@ -2888,6 +2888,7 @@ ngx_http_upstream_next(ngx_http_request_ #endif ngx_close_connection(u->peer.connection); + u->peer.connection = NULL; } #if 0