diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2013-03-14 16:22:43 +0000 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2013-03-14 16:22:43 +0000 |
commit | 3f70ddcfc69cc16f1d1b9b8bb450a0e21135c30a (patch) | |
tree | 29575998cb0f7cef6d7842c438d9de32adc8060d /src/http/ngx_http_upstream.c | |
parent | c49abd2317594423a4399a1d32aee96cacaddc13 (diff) | |
download | nginx-3f70ddcfc69cc16f1d1b9b8bb450a0e21135c30a.tar.gz nginx-3f70ddcfc69cc16f1d1b9b8bb450a0e21135c30a.zip |
Upstream: fixed previous commit.
Store r->connection on stack to make sure it's still available if request
finalization happens to actually free request memory.
Diffstat (limited to 'src/http/ngx_http_upstream.c')
-rw-r--r-- | src/http/ngx_http_upstream.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 1734eae98..e9ea72c46 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -878,11 +878,13 @@ ngx_http_upstream_cache_send(ngx_http_request_t *r, ngx_http_upstream_t *u) static void ngx_http_upstream_resolve_handler(ngx_resolver_ctx_t *ctx) { + ngx_connection_t *c; ngx_http_request_t *r; ngx_http_upstream_t *u; ngx_http_upstream_resolved_t *ur; r = ctx->data; + c = r->connection; u = r->upstream; ur = u->resolved; @@ -929,7 +931,7 @@ ngx_http_upstream_resolve_handler(ngx_resolver_ctx_t *ctx) failed: - ngx_http_run_posted_requests(r->connection); + ngx_http_run_posted_requests(c); } |