diff options
| author | Cory Fields <[email protected]> | 2013-05-28 16:00:17 -0400 |
|---|---|---|
| committer | Cory Fields <[email protected]> | 2013-06-04 03:53:40 -0400 |
| commit | a9380c72bee0fc134a2215d7919b52936bd8158d (patch) | |
| tree | 5425fb91a8917c344ddc96afec579df010c43a95 /src/init.cpp | |
| parent | Merge pull request #2613 from jonasschnelli/prefsFix (diff) | |
| download | discoin-a9380c72bee0fc134a2215d7919b52936bd8158d.tar.xz discoin-a9380c72bee0fc134a2215d7919b52936bd8158d.zip | |
build: prepare to move DetectShutdownThread
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 78f838f7c..6777f48d5 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) |