GH-2136: Clean up DNS_Mgr before shutting down

This commit is contained in:
Tim Wojtulewicz 2022-06-01 09:21:23 -07:00
parent 65589c9bcb
commit 82576f8de2
3 changed files with 35 additions and 3 deletions

View file

@ -61,11 +61,12 @@ Manager::~Manager()
delete wakeup;
wakeup = nullptr;
for ( SourceList::iterator i = sources.begin(); i != sources.end(); ++i )
{
auto src = *i;
// Make sure all of the sources are done before we try to delete any of them.
for ( auto& src : sources )
src->src->Done();
for ( auto& src : sources )
{
if ( src->manage_lifetime )
delete src->src;