diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-03-18 11:37:44 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-03-18 11:37:52 +0100 |
| commit | fa8c6ddbef5e4d8950be9509e0aeac36c1f69bbb (patch) | |
| tree | a29e4079599fffbc1e83d0cf718b0b8451c02904 | |
| parent | Fix regsig checking for subkey sigs in verify-commits (diff) | |
| parent | Add missing braces in semaphore posts in net (diff) | |
| download | discoin-fa8c6ddbef5e4d8950be9509e0aeac36c1f69bbb.tar.xz discoin-fa8c6ddbef5e4d8950be9509e0aeac36c1f69bbb.zip | |
Merge #10013: Fix shutdown hang with >= 8 -addnodes set (0.14 backport)
4e2502b Add missing braces in semaphore posts in net (Matt Corallo)
d2548a4 Fix shutdown hang with >= 8 -addnodes set (Matt Corallo)
Tree-SHA512: 0b157793a2c7fabbc2ed24f974d206fc01c816189d6b6aa5a61bab562a0034f72b643a19b1e7920061e479fb27eddd4abf1c40e772a9573346b221a08e7e5ed9
| -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 de5fc2969..03c8e5ecc 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2318,9 +2318,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() @@ -2336,10 +2344,6 @@ void CConnman::Stop() if (threadSocketHandler.joinable()) threadSocketHandler.join(); - if (semAddnode) - for (int i=0; i<nMaxAddnode; i++) - semOutbound->post(); - if (fAddressesInitialized) { DumpData(); |