diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-09 12:27:45 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-09 12:27:59 +0100 |
commit | 7266bb1bdc35466a956e1596a5369d3e866503ce (patch) | |
tree | f427836da604cebc101c29f00abd87574820b516 /src/net.cpp | |
parent | 7202d9d9bf6e7442ea8e945b271dcec079ff5239 (diff) | |
parent | 80ecf6702ad53488758d431133585b1e5c8b57f0 (diff) |
Merge pull request #3373
80ecf67 Add ThreadGetMyExternalIP to net thread group (Gavin Andresen)
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp index a6a04cdd46..6ae749c657 100644 --- a/src/net.cpp +++ b/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 |