mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
detach from view early in client destruction so that the resolver
can start shutting down immediately instead of only after recursions in progress have finished
This commit is contained in:
@@ -139,6 +139,14 @@ maybe_free(ns_client_t *client) {
|
|||||||
isc_socket_cancel(socket, client->task, ISC_SOCKCANCEL_SEND);
|
isc_socket_cancel(socket, client->task, ISC_SOCKCANCEL_SEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We need to detach from the view early, because when shutting
|
||||||
|
* down the server, resolver shutdown does not begin until
|
||||||
|
* happen until the view refcount goes to zero.
|
||||||
|
*/
|
||||||
|
if (client->view != NULL)
|
||||||
|
dns_view_detach(&client->view);
|
||||||
|
|
||||||
if (!(client->nreads == 0 && client->naccepts == 0 &&
|
if (!(client->nreads == 0 && client->naccepts == 0 &&
|
||||||
client->nsends == 0 && client->nwaiting == 0)) {
|
client->nsends == 0 && client->nwaiting == 0)) {
|
||||||
/* Still waiting for events. */
|
/* Still waiting for events. */
|
||||||
@@ -162,8 +170,6 @@ maybe_free(ns_client_t *client) {
|
|||||||
&client->dispentry,
|
&client->dispentry,
|
||||||
deventp);
|
deventp);
|
||||||
}
|
}
|
||||||
if (client->view != NULL)
|
|
||||||
dns_view_detach(&client->view);
|
|
||||||
if (client->opt != NULL) {
|
if (client->opt != NULL) {
|
||||||
INSIST(dns_rdataset_isassociated(client->opt));
|
INSIST(dns_rdataset_isassociated(client->opt));
|
||||||
dns_rdataset_disassociate(client->opt);
|
dns_rdataset_disassociate(client->opt);
|
||||||
|
Reference in New Issue
Block a user