diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-05-12 17:44:14 +0200 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-05-25 21:32:06 +0000 |
commit | 17badef789bf74fb3f4c5d95ac59c080ae656201 (patch) | |
tree | 1caa6abbecabfabd6c73dd9c5ab1fc4cbbcca19e | |
parent | a49927a46d578d142411c52b17c6f11bb19da03d (diff) |
Do not signal outbound semaphore if uninitialized
-rw-r--r-- | src/net.cpp | 5 |
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; |