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 index ef16a66..3d022c7 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c
@@ -2927,6 +2927,7 @@ } ngx_close_connection(u->peer.connection); + u->peer.connection = NULL; } #if 0