comparison src/http/ngx_http_upstream.c @ 4143:114e3a7c3b8d

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 Sun, 25 Sep 2011 20:00:36 +0000
parents 70e1ee2307f9
children 3549db8ceaf2
comparison
equal deleted inserted replaced
4142:7b632622ba56 4143:114e3a7c3b8d
2925 if (u->peer.connection->pool) { 2925 if (u->peer.connection->pool) {
2926 ngx_destroy_pool(u->peer.connection->pool); 2926 ngx_destroy_pool(u->peer.connection->pool);
2927 } 2927 }
2928 2928
2929 ngx_close_connection(u->peer.connection); 2929 ngx_close_connection(u->peer.connection);
2930 u->peer.connection = NULL;
2930 } 2931 }
2931 2932
2932 #if 0 2933 #if 0
2933 if (u->conf->busy_lock && !u->busy_locked) { 2934 if (u->conf->busy_lock && !u->busy_locked) {
2934 ngx_http_upstream_busy_lock(p); 2935 ngx_http_upstream_busy_lock(p);