2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +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:
Andreas Gustafsson
2000-01-19 22:03:58 +00:00
parent 99abbe0bc4
commit 4702aa0b47

View File

@@ -139,6 +139,14 @@ maybe_free(ns_client_t *client) {
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 &&
client->nsends == 0 && client->nwaiting == 0)) {
/* Still waiting for events. */
@@ -162,8 +170,6 @@ maybe_free(ns_client_t *client) {
&client->dispentry,
deventp);
}
if (client->view != NULL)
dns_view_detach(&client->view);
if (client->opt != NULL) {
INSIST(dns_rdataset_isassociated(client->opt));
dns_rdataset_disassociate(client->opt);