Do not signal outbound semaphore if uninitialized

This commit is contained in:
Pieter Wuille
2012-05-25 21:32:06 +00:00
committed by Luke Dashjr
parent a49927a46d
commit 17badef789
+3 -2
View File
@@ -1703,8 +1703,9 @@ bool StopNode()
fShutdown = true;
nTransactionsUpdated++;
int64 nStart = GetTime();
for (int i=0; i<MAX_OUTBOUND_CONNECTIONS; i++)
semOutbound->post();
if (semOutbound)
for (int i=0; i<MAX_OUTBOUND_CONNECTIONS; i++)
semOutbound->post();
do
{
int nThreadsRunning = 0;