Skip to content

Commit 7266bb1

Browse files
committed
Merge pull request #3373
80ecf67 Add ThreadGetMyExternalIP to net thread group (Gavin Andresen)
2 parents 7202d9d + 80ecf67 commit 7266bb1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/net.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,7 @@ bool BindListenPort(const CService &addrBind, string& strError)
16781678
return true;
16791679
}
16801680

1681-
void static Discover()
1681+
void static Discover(boost::thread_group& threadGroup)
16821682
{
16831683
if (!fDiscover)
16841684
return;
@@ -1731,7 +1731,7 @@ void static Discover()
17311731

17321732
// Don't use external IPv4 discovery, when -onlynet="IPv6"
17331733
if (!IsLimited(NET_IPV4))
1734-
boost::thread(boost::bind(&TraceThread<void (*)()>, "ext-ip", &ThreadGetMyExternalIP));
1734+
threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "ext-ip", &ThreadGetMyExternalIP));
17351735
}
17361736

17371737
void StartNode(boost::thread_group& threadGroup)
@@ -1745,7 +1745,7 @@ void StartNode(boost::thread_group& threadGroup)
17451745
if (pnodeLocalHost == NULL)
17461746
pnodeLocalHost = new CNode(INVALID_SOCKET, CAddress(CService("127.0.0.1", 0), nLocalServices));
17471747

1748-
Discover();
1748+
Discover(threadGroup);
17491749

17501750
//
17511751
// Start threads

0 commit comments

Comments
 (0)