From 8060b18aa88fc3f34412716e814715ff21a4d95b Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 17 Apr 2019 04:26:08 -0700 Subject: [PATCH] modules/s_dns_resolver: Improve dock notifications; adjust the timeout worker cadence. --- modules/s_dns_resolver.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/s_dns_resolver.cc b/modules/s_dns_resolver.cc index 1d0f74019..c81709a41 100644 --- a/modules/s_dns_resolver.cc +++ b/modules/s_dns_resolver.cc @@ -224,7 +224,6 @@ ircd::net::dns::resolver::set_tag(A&&... args) std::forward_as_tuple(id), std::forward_as_tuple(std::forward(args)...)); it->second.id = id; - dock.notify_one(); return it->second; } @@ -299,7 +298,7 @@ try return !tags.empty(); }); - ctx::sleep(milliseconds(timeout)); + ctx::sleep(milliseconds(timeout) / 2); check_timeouts(milliseconds(timeout)); } } @@ -396,6 +395,8 @@ ircd::net::dns::resolver::submit(tag &tag) send_query(tag); else queue_query(tag); + + dock.notify_all(); } void @@ -440,7 +441,6 @@ ircd::net::dns::resolver::queue_query(tag &tag) return; sendq.emplace_back(tag.id); - dock.notify_one(); log::debug {