From 3f647537790e02e892701f4bb2586ccd964c2631 Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Wed, 8 Sep 2010 19:24:32 +0000 Subject: Gavin Andresen: clean shutdown on SIGTERM git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@149 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- net.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net.cpp') diff --git a/net.cpp b/net.cpp index d1fdd241b..1a64a82c1 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; -- cgit v1.2.3 From 7629d36a530087806e80ed3c5866e8ec64319828 Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Thu, 9 Sep 2010 01:00:40 +0000 Subject: try to auto-detect whether to use 128-bit 4-way SSE2 git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@150 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- net.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'net.cpp') diff --git a/net.cpp b/net.cpp index 1a64a82c1..82b3ffb15 100644 --- a/net.cpp +++ b/net.cpp @@ -1160,7 +1160,9 @@ void ThreadMessageHandler2(void* parg) pnode->Release(); } - // Wait and allow messages to bunch up + // Wait and allow messages to bunch up. + // Reduce vnThreadsRunning so StopNode has permission to exit while + // we're sleeping, but we must always check fShutdown after doing this. vnThreadsRunning[2]--; Sleep(100); if (fRequestShutdown) -- cgit v1.2.3