diff options
| author | Cory Fields <[email protected]> | 2016-12-27 17:12:44 -0500 |
|---|---|---|
| committer | Cory Fields <[email protected]> | 2017-01-03 17:53:09 -0500 |
| commit | 0985052319263bd7ca9744af3504682b3ea8e21a (patch) | |
| tree | cc74f7747c52fa8de11b50683058af319f0f50d8 /src/init.cpp | |
| parent | net: add CThreadInterrupt and InterruptibleSleep (diff) | |
| download | discoin-0985052319263bd7ca9744af3504682b3ea8e21a.tar.xz discoin-0985052319263bd7ca9744af3504682b3ea8e21a.zip | |
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.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 7d2bcb57b..7a493cc19 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 |