mirror of
https://github.com/monero-project/monero.git
synced 2024-12-28 01:59:25 -05:00
Merge pull request #2132
464afd4d
Ensure DNSResolver destructor runs on exit (Howard Chu)
This commit is contained in:
commit
159a6e9669
@ -307,12 +307,8 @@ DNSResolver& DNSResolver::instance()
|
|||||||
{
|
{
|
||||||
boost::lock_guard<boost::mutex> lock(instance_lock);
|
boost::lock_guard<boost::mutex> lock(instance_lock);
|
||||||
|
|
||||||
static DNSResolver* staticInstance = NULL;
|
static DNSResolver staticInstance;
|
||||||
if (staticInstance == NULL)
|
return staticInstance;
|
||||||
{
|
|
||||||
staticInstance = new DNSResolver();
|
|
||||||
}
|
|
||||||
return *staticInstance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DNSResolver DNSResolver::create()
|
DNSResolver DNSResolver::create()
|
||||||
|
Loading…
Reference in New Issue
Block a user