mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge pull request #3373
80ecf67
Add ThreadGetMyExternalIP to net thread group (Gavin Andresen)
This commit is contained in:
commit
7266bb1bdc
@ -1678,7 +1678,7 @@ bool BindListenPort(const CService &addrBind, string& strError)
|
||||
return true;
|
||||
}
|
||||
|
||||
void static Discover()
|
||||
void static Discover(boost::thread_group& threadGroup)
|
||||
{
|
||||
if (!fDiscover)
|
||||
return;
|
||||
@ -1731,7 +1731,7 @@ void static Discover()
|
||||
|
||||
// Don't use external IPv4 discovery, when -onlynet="IPv6"
|
||||
if (!IsLimited(NET_IPV4))
|
||||
boost::thread(boost::bind(&TraceThread<void (*)()>, "ext-ip", &ThreadGetMyExternalIP));
|
||||
threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "ext-ip", &ThreadGetMyExternalIP));
|
||||
}
|
||||
|
||||
void StartNode(boost::thread_group& threadGroup)
|
||||
@ -1745,7 +1745,7 @@ void StartNode(boost::thread_group& threadGroup)
|
||||
if (pnodeLocalHost == NULL)
|
||||
pnodeLocalHost = new CNode(INVALID_SOCKET, CAddress(CService("127.0.0.1", 0), nLocalServices));
|
||||
|
||||
Discover();
|
||||
Discover(threadGroup);
|
||||
|
||||
//
|
||||
// Start threads
|
||||
|
Loading…
Reference in New Issue
Block a user