diff --git a/modules/net_dns_resolver.cc b/modules/net_dns_resolver.cc index c848b75e4..cf3fe7ac8 100644 --- a/modules/net_dns_resolver.cc +++ b/modules/net_dns_resolver.cc @@ -132,37 +132,20 @@ ircd::net::dns::resolver::resolver(answers_callback callback) ircd::net::dns::resolver::~resolver() noexcept { - log::debug - { - log, "Shutting down with %zu unfinished DNS resolutions.", - tags.size() - }; - const ctx::uninterruptible::nothrow ui; - if(ns.is_open()) - ns.close(); - done.wait([this] { if(!tags.empty()) log::warning { - log, "Waiting for %zu unfinished DNS resolutions", + log, "Waiting for %zu unfinished DNS resolutions...", tags.size() }; return tags.empty(); }); - const std::lock_guard lock - { - mutex - }; - - timeout_context.terminate(); - sendq_context.terminate(); - recv_context.terminate(); - + assert(!mutex.locked()); assert(sendq.empty()); assert(tags.empty()); } @@ -306,7 +289,6 @@ catch(const std::out_of_range &e) void ircd::net::dns::resolver::timeout_worker() -try { while(1) { @@ -318,16 +300,6 @@ try check_timeouts(milliseconds(timeout)); } } -catch(const ctx::terminated &) -{ - const ctx::exception_handler eh; - const std::lock_guard lock - { - mutex - }; - - cancel_all(); -} void ircd::net::dns::resolver::check_timeouts(const milliseconds &timeout)