From 28f0660a9d293f38b09ed225727452cafa14bcde Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 15 Apr 2019 17:27:16 -0700 Subject: [PATCH] modules/s_dns_resolver: Call notify after erasing tag. --- modules/s_dns_resolver.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/s_dns_resolver.cc b/modules/s_dns_resolver.cc index 8576c06ab..02389cc8e 100644 --- a/modules/s_dns_resolver.cc +++ b/modules/s_dns_resolver.cc @@ -835,9 +835,20 @@ ircd::net::dns::resolver::remove(tag &tag, sendq.size() }; - unqueue(tag); - done.notify_all(); - return it != end(tags)? tags.erase(it) : it; + if(it != end(tags)) + unqueue(tag); + + const auto ret + { + it != end(tags)? + tags.erase(it): + it + }; + + if(ret != end(tags)) + done.notify_all(); + + return it; } void