mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
modules/s_dns_resolver: Wait for tags to finish before terminating assets.
This commit is contained in:
parent
d5a0f6b5c7
commit
88f924f27a
1 changed files with 6 additions and 5 deletions
|
@ -134,22 +134,23 @@ noexcept
|
|||
if(ns.is_open())
|
||||
ns.close();
|
||||
|
||||
timeout_context.terminate();
|
||||
sendq_context.terminate();
|
||||
recv_context.terminate();
|
||||
done.wait([this]
|
||||
{
|
||||
const bool ret(tags.empty());
|
||||
|
||||
if(!ret)
|
||||
log::warning
|
||||
{
|
||||
log, "Waiting for %zu unfinished DNS resolutions", tags.size()
|
||||
log, "Waiting for %zu unfinished DNS resolutions",
|
||||
tags.size()
|
||||
};
|
||||
|
||||
return ret;
|
||||
});
|
||||
|
||||
timeout_context.terminate();
|
||||
sendq_context.terminate();
|
||||
recv_context.terminate();
|
||||
|
||||
assert(tags.empty());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue