Merge pull request #3373

80ecf67 Add ThreadGetMyExternalIP to net thread group (Gavin Andresen)
This commit is contained in:
Wladimir J. van der Laan 2013-12-09 12:27:45 +01:00
commit 7266bb1bdc
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 3 additions and 3 deletions

View File

@ -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