mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-09 14:28:22 +00:00
Merge pull request #2606 from gavinandresen/threadfix
Exit cleanly if AppInit2 returns false
This commit is contained in:
commit
f309cb76c2
@ -1041,6 +1041,9 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
if (!CheckDiskSpace())
|
if (!CheckDiskSpace())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (!strErrors.str().empty())
|
||||||
|
return InitError(strErrors.str());
|
||||||
|
|
||||||
RandAddSeedPerfmon();
|
RandAddSeedPerfmon();
|
||||||
|
|
||||||
//// debug print
|
//// debug print
|
||||||
@ -1062,9 +1065,6 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
|
|
||||||
uiInterface.InitMessage(_("Done loading"));
|
uiInterface.InitMessage(_("Done loading"));
|
||||||
|
|
||||||
if (!strErrors.str().empty())
|
|
||||||
return InitError(strErrors.str());
|
|
||||||
|
|
||||||
// Add wallet transactions that aren't already in a block to mapTransactions
|
// Add wallet transactions that aren't already in a block to mapTransactions
|
||||||
pwalletMain->ReacceptWalletTransactions();
|
pwalletMain->ReacceptWalletTransactions();
|
||||||
|
|
||||||
|
@ -282,6 +282,9 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
threadGroup.interrupt_all();
|
||||||
|
threadGroup.join_all();
|
||||||
|
Shutdown();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user