diff options
Diffstat (limited to 'net.cpp')
-rw-r--r-- | net.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1160,9 +1160,13 @@ 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) + Shutdown(NULL); vnThreadsRunning[2]++; if (fShutdown) return; |