fix segfault in resolver:

ngx_resolve_name_done() and ngx_resolve_addr_done() did not delete
contexts from a resolver node waiting list.
This commit is contained in:
Igor Sysoev 2009-11-09 17:45:56 +00:00
parent 21accae8e5
commit 64bfa87e73

View File

@ -464,6 +464,7 @@ ngx_resolve_name_locked(ngx_resolver_t *r, ngx_resolver_ctx_t *ctx)
ctx->next = rn->waiting;
rn->waiting = ctx;
ctx->state = NGX_AGAIN;
return NGX_AGAIN;
}
@ -625,6 +626,7 @@ ngx_resolve_addr(ngx_resolver_ctx_t *ctx)
ctx->next = rn->waiting;
rn->waiting = ctx;
ctx->state = NGX_AGAIN;
/* unlock addr mutex */