mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Get local host IP on Linux, Shutdown() a little cleaner -- linux-0.1.6-test1 waypoint
This commit is contained in:
13
ui.cpp
13
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)
|
||||
|
||||
Reference in New Issue
Block a user