From fd30c4701c8b91acf7308e70a539e3ed59f0680f Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 20 Sep 2019 12:27:46 -0700 Subject: [PATCH] ircd::net::dns: Wait on cache before resolver on fini; replace regressed (26cd9cec85d3). --- modules/net_dns.cc | 4 ++-- modules/net_dns_resolver.cc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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());