aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-12-27 17:12:44 -0500
committerCory Fields <cory-nospam-@coryfields.com>2017-01-03 17:53:09 -0500
commit0985052319263bd7ca9744af3504682b3ea8e21a (patch)
treecc74f7747c52fa8de11b50683058af319f0f50d8 /src/init.cpp
parent799df9115f262fbc25c2c2737ccd8a4e1b20e5b0 (diff)
downloadbitcoin-0985052319263bd7ca9744af3504682b3ea8e21a.tar.xz
net: make net interruptible
Also now that net threads are interruptible, switch them to use std threads/binds/mutexes/condvars.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 7d2bcb57b1..7a493cc195 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -176,6 +176,8 @@ void Interrupt(boost::thread_group& threadGroup)
InterruptRPC();
InterruptREST();
InterruptTorControl();
+ if (g_connman)
+ g_connman->Interrupt();
threadGroup.interrupt_all();
}
@@ -1572,7 +1574,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
connOptions.nMaxOutboundTimeframe = nMaxOutboundTimeframe;
connOptions.nMaxOutboundLimit = nMaxOutboundLimit;
- if(!connman.Start(threadGroup, scheduler, strNodeError, connOptions))
+ if (!connman.Start(scheduler, strNodeError, connOptions))
return InitError(strNodeError);
// ********************************************************* Step 12: finished