summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2011-09-25 20:00:36 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2011-09-25 20:00:36 +0000
commit28b001f897e3d3dfdffe1cca811657dd36961605 (patch)
treeccc0b21d71a282ea3a657ede9ce8b74a4ba4d623
parentb1565cf96b8a17409151d3fd10b434729ddf5fe8 (diff)
downloadnginx-28b001f897e3d3dfdffe1cca811657dd36961605.tar.gz
nginx-28b001f897e3d3dfdffe1cca811657dd36961605.tar.bz2
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.
-rw-r--r--src/http/ngx_http_upstream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index ef16a662c..3d022c78f 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -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