mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
modules/s_dns_resolver: Improve dock notifications; adjust the timeout worker cadence.
This commit is contained in:
parent
08b53b1746
commit
8060b18aa8
1 changed files with 3 additions and 3 deletions
|
@ -224,7 +224,6 @@ ircd::net::dns::resolver::set_tag(A&&... args)
|
|||
std::forward_as_tuple(id),
|
||||
std::forward_as_tuple(std::forward<A>(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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue