diff --git a/modules/net_dns.cc b/modules/net_dns.cc index 3f9ecd266..847611bcf 100644 --- a/modules/net_dns.cc +++ b/modules/net_dns.cc @@ -27,8 +27,6 @@ ircd::net::dns::init() void ircd::net::dns::fini() { - resolver_fini(); - if(!cache::waiting.empty()) log::warning { @@ -40,6 +38,8 @@ ircd::net::dns::fini() { return cache::waiting.empty(); }); + + resolver_fini(); } void diff --git a/modules/net_dns_resolver.cc b/modules/net_dns_resolver.cc index cf3fe7ac8..749ec7f40 100644 --- a/modules/net_dns_resolver.cc +++ b/modules/net_dns_resolver.cc @@ -145,6 +145,7 @@ noexcept return tags.empty(); }); + ns.close(); assert(!mutex.locked()); assert(sendq.empty()); assert(tags.empty());