aboutsummaryrefslogtreecommitdiff
path: root/ui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui.cpp')
-rw-r--r--ui.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/ui.cpp b/ui.cpp
index a1873d5c2d..e12970b81b 100644
--- a/ui.cpp
+++ b/ui.cpp
@@ -387,17 +387,28 @@ CMainFrame::~CMainFrame()
void Shutdown(void* parg)
{
static CCriticalSection cs_Shutdown;
+ static bool fTaken;
+ bool fFirstThread;
CRITICAL_BLOCK(cs_Shutdown)
{
+ fFirstThread = !fTaken;
+ fTaken = true;
+ }
+ if (fFirstThread)
+ {
fShutdown = true;
nTransactionsUpdated++;
DBFlush(false);
StopNode();
DBFlush(true);
-
printf("Bitcoin exiting\n\n");
exit(0);
}
+ else
+ {
+ loop
+ Sleep(100000);
+ }
}
void CMainFrame::OnClose(wxCloseEvent& event)