aboutsummaryrefslogtreecommitdiff
path: root/net.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-09-08 19:24:32 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-09-08 19:24:32 +0000
commit3f647537790e02e892701f4bb2586ccd964c2631 (patch)
treebdbaf24dfcf13214803ba6416871b91b2b7a39ef /net.cpp
parentf1e1fb4bdef878c8fc1564fa418d44e7541a7e83 (diff)
Gavin Andresen: clean shutdown on SIGTERM
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@149 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'net.cpp')
-rw-r--r--net.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/net.cpp b/net.cpp
index d1fdd241bc..1a64a82c14 100644
--- a/net.cpp
+++ b/net.cpp
@@ -1163,6 +1163,8 @@ void ThreadMessageHandler2(void* parg)
// Wait and allow messages to bunch up
vnThreadsRunning[2]--;
Sleep(100);
+ if (fRequestShutdown)
+ Shutdown(NULL);
vnThreadsRunning[2]++;
if (fShutdown)
return;