mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-03 22:03:01 +01:00
Bugfix: Fix various places where Bitcoin-Qt was being shutdown improperly
(Partial/merge of upstream9247134eab,1a3f0da922, and3e34352222)
This commit is contained in:
committed by
Luke Dashjr
parent
0b1fda6f65
commit
276cfd8530
11
src/init.cpp
11
src/init.cpp
@@ -41,6 +41,17 @@ void ExitTimeout(void* parg)
|
||||
#endif
|
||||
}
|
||||
|
||||
void StartShutdown()
|
||||
{
|
||||
#ifdef QT_GUI
|
||||
// ensure we leave the Qt main loop for a clean GUI exit (Shutdown() is called in bitcoin.cpp afterwards)
|
||||
QueueShutdown();
|
||||
#else
|
||||
// Without UI, Shutdown() can simply be started in a new thread
|
||||
CreateThread(Shutdown, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Shutdown(void* parg)
|
||||
{
|
||||
static CCriticalSection cs_Shutdown;
|
||||
|
||||
Reference in New Issue
Block a user