diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2011-12-13 18:30:15 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2011-12-13 18:30:15 +0000 |
| commit | 5d45af698c8a4924616f5a6ce2f5742a18f84217 (patch) | |
| tree | dff8ddc956d2cf88e8a38e810293ff532ab5cf20 /src | |
| parent | 86e4445d8a2d10c4089b259dc40b1fb782da4eed (diff) | |
| download | nginx-5d45af698c8a4924616f5a6ce2f5742a18f84217.tar.gz nginx-5d45af698c8a4924616f5a6ce2f5742a18f84217.tar.bz2 | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/ngx_http_upstream.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 5aa96a425..7fba19faf 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2888,6 +2888,7 @@ ngx_http_upstream_next(ngx_http_request_t *r, ngx_http_upstream_t *u, #endif ngx_close_connection(u->peer.connection); + u->peer.connection = NULL; } #if 0 |
