Merge #9953: Fix shutdown hang with >= 8 -addnodes set
819b513
Add missing braces in semaphore posts in net (Matt Corallo)e007b24
Fix shutdown hang with >= 8 -addnodes set (Matt Corallo) Tree-SHA512: f2d7562bd5d333cd0e80562eb3b1fe329fc10ee713996e053d2ed669db6d9eb39550e0a6c6ab768cd070bfe92a5ea85e0f752470206706de196bd4a689b9bc07
This commit is contained in:
commit
f8a709161f
16
src/net.cpp
16
src/net.cpp
|
@ -2319,9 +2319,17 @@ void CConnman::Interrupt()
|
||||||
interruptNet();
|
interruptNet();
|
||||||
InterruptSocks5(true);
|
InterruptSocks5(true);
|
||||||
|
|
||||||
if (semOutbound)
|
if (semOutbound) {
|
||||||
for (int i=0; i<(nMaxOutbound + nMaxFeeler); i++)
|
for (int i=0; i<(nMaxOutbound + nMaxFeeler); i++) {
|
||||||
semOutbound->post();
|
semOutbound->post();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (semAddnode) {
|
||||||
|
for (int i=0; i<nMaxAddnode; i++) {
|
||||||
|
semAddnode->post();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConnman::Stop()
|
void CConnman::Stop()
|
||||||
|
@ -2337,10 +2345,6 @@ void CConnman::Stop()
|
||||||
if (threadSocketHandler.joinable())
|
if (threadSocketHandler.joinable())
|
||||||
threadSocketHandler.join();
|
threadSocketHandler.join();
|
||||||
|
|
||||||
if (semAddnode)
|
|
||||||
for (int i=0; i<nMaxAddnode; i++)
|
|
||||||
semOutbound->post();
|
|
||||||
|
|
||||||
if (fAddressesInitialized)
|
if (fAddressesInitialized)
|
||||||
{
|
{
|
||||||
DumpData();
|
DumpData();
|
||||||
|
|
Loading…
Reference in New Issue