mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-01-31 10:30:52 +00:00
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
This commit is contained in:
commit
fa8c6ddbef
16
src/net.cpp
16
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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user