comparison src/http/ngx_http_upstream.c @ 4348:6af89b1b16e8 stable-1.0

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 13 Dec 2011 18:30:15 +0000
parents f83b47591642
children e04fdb54dd71
comparison
equal deleted inserted replaced
4347:4d45c138e3df 4348:6af89b1b16e8
2886 (void) ngx_ssl_shutdown(u->peer.connection); 2886 (void) ngx_ssl_shutdown(u->peer.connection);
2887 } 2887 }
2888 #endif 2888 #endif
2889 2889
2890 ngx_close_connection(u->peer.connection); 2890 ngx_close_connection(u->peer.connection);
2891 u->peer.connection = NULL;
2891 } 2892 }
2892 2893
2893 #if 0 2894 #if 0
2894 if (u->conf->busy_lock && !u->busy_locked) { 2895 if (u->conf->busy_lock && !u->busy_locked) {
2895 ngx_http_upstream_busy_lock(p); 2896 ngx_http_upstream_busy_lock(p);