Browse Source

Merge pull request #3373

80ecf67 Add ThreadGetMyExternalIP to net thread group (Gavin Andresen)
try
Wladimir J. van der Laan 11 years ago
parent
commit
7266bb1bdc
No known key found for this signature in database GPG Key ID: 74810B012346C9A6
  1. 6
      src/net.cpp

6
src/net.cpp

@ -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…
Cancel
Save