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.
This commit is contained in:
Maxim Dounin 2011-09-25 20:00:36 +00:00
parent b1565cf96b
commit 28b001f897

View File

@ -2927,6 +2927,7 @@ ngx_http_upstream_next(ngx_http_request_t *r, ngx_http_upstream_t *u,
}
ngx_close_connection(u->peer.connection);
u->peer.connection = NULL;
}
#if 0