mirror of
https://github.com/nginx/nginx.git
synced 2025-06-11 04:12:40 +08:00
quick resolving handles u->resolved->ctx by itself
This commit is contained in:
parent
a4ec6869fc
commit
f576f0d2bc
@ -421,13 +421,14 @@ ngx_http_upstream_init(ngx_http_request_t *r)
|
|||||||
ctx->data = r;
|
ctx->data = r;
|
||||||
ctx->timeout = clcf->resolver_timeout;
|
ctx->timeout = clcf->resolver_timeout;
|
||||||
|
|
||||||
|
u->resolved->ctx = ctx;
|
||||||
|
|
||||||
if (ngx_resolve_name(ctx) != NGX_OK) {
|
if (ngx_resolve_name(ctx) != NGX_OK) {
|
||||||
|
u->resolved->ctx = NULL;
|
||||||
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
u->resolved->ctx = ctx;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user