diff options
author | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2009-11-08 04:24:52 +0000 |
---|---|---|
committer | s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b> | 2009-11-08 04:24:52 +0000 |
commit | e9c2b5c84d7bbb7f173cbe6035f6299248e14769 (patch) | |
tree | 05af29c750335841182e060f2332adc384b88810 /ui.cpp | |
parent | 158ea66c6c6653a033f884f13dc082046a58f74a (diff) | |
download | bitcoin-e9c2b5c84d7bbb7f173cbe6035f6299248e14769.tar.xz |
Get local host IP on Linux, Shutdown() a little cleaner -- linux-0.1.6-test1 waypoint
Diffstat (limited to 'ui.cpp')
-rw-r--r-- | ui.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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)
|