0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 18:18:56 +02:00

modules/s_dns_resolver: Wait for tags to finish before terminating assets.

This commit is contained in:
Jason Volk 2019-04-23 15:00:13 -07:00
parent d5a0f6b5c7
commit 88f924f27a

View file

@ -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());
}