quick resolving handles u->resolved->ctx by itself

This commit is contained in:
Igor Sysoev 2008-04-09 14:20:17 +00:00
parent a4ec6869fc
commit f576f0d2bc

View File

@ -421,13 +421,14 @@ ngx_http_upstream_init(ngx_http_request_t *r)
ctx->data = r;
ctx->timeout = clcf->resolver_timeout;
u->resolved->ctx = ctx;
if (ngx_resolve_name(ctx) != NGX_OK) {
u->resolved->ctx = NULL;
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
}
u->resolved->ctx = ctx;
return;
}