Mercurial > hg > nginx
changeset 5113:08b36f2afc3f
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 14 Mar 2013 16:22:43 +0000 |
parents | d3c15c7831eb |
children | a46c1cfe7263 |
files | src/http/ngx_http_upstream.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Thu Mar 14 12:37:54 2013 +0000 +++ b/src/http/ngx_http_upstream.c Thu Mar 14 16:22:43 2013 +0000 @@ -878,11 +878,13 @@ 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 @@ failed: - ngx_http_run_posted_requests(r->connection); + ngx_http_run_posted_requests(c); }