diff --git a/lib/ns/client.c b/lib/ns/client.c index 63a6441ee5..269ebe1366 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -1577,6 +1577,14 @@ ns__client_reset_cb(void *client0) { ns_client_log(client, DNS_LOGCATEGORY_SECURITY, NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3), "reset client"); + /* + * We never started processing this client, possible if we're + * shutting down, just exit. + */ + if (client->state == NS_CLIENTSTATE_READY) { + return; + } + ns_client_endrequest(client); if (client->tcpbuf != NULL) { isc_mem_put(client->mctx, client->tcpbuf,