diff options
-rw-r--r-- | src/net.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/net.cpp b/src/net.cpp index 6ff63d4730..4434793c4c 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2319,9 +2319,17 @@ void CConnman::Interrupt() interruptNet(); InterruptSocks5(true); - if (semOutbound) - for (int i=0; i<(nMaxOutbound + nMaxFeeler); i++) + if (semOutbound) { + for (int i=0; i<(nMaxOutbound + nMaxFeeler); i++) { semOutbound->post(); + } + } + + if (semAddnode) { + for (int i=0; i<nMaxAddnode; i++) { + semAddnode->post(); + } + } } void CConnman::Stop() @@ -2337,10 +2345,6 @@ void CConnman::Stop() if (threadSocketHandler.joinable()) threadSocketHandler.join(); - if (semAddnode) - for (int i=0; i<nMaxAddnode; i++) - semOutbound->post(); - if (fAddressesInitialized) { DumpData(); |