diff options
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index 78f838f7cb..6777f48d57 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -123,13 +123,15 @@ void Shutdown() // void DetectShutdownThread(boost::thread_group* threadGroup) { + bool shutdown = ShutdownRequested(); // Tell the main threads to shutdown. - while (!fRequestShutdown) + while (!shutdown) { MilliSleep(200); - if (fRequestShutdown) - threadGroup->interrupt_all(); + shutdown = ShutdownRequested(); } + if (threadGroup) + threadGroup->interrupt_all(); } void HandleSIGTERM(int) |