aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-05-12 17:44:14 +0200
committerLuke Dashjr <luke-jr+git@utopios.org>2012-05-25 21:32:06 +0000
commit17badef789bf74fb3f4c5d95ac59c080ae656201 (patch)
tree1caa6abbecabfabd6c73dd9c5ab1fc4cbbcca19e
parenta49927a46d578d142411c52b17c6f11bb19da03d (diff)
Do not signal outbound semaphore if uninitialized
-rw-r--r--src/net.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 1227412fe4..37b01f7599 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -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;