Startup and shutdown improvements. Performance improvements.

This commit is contained in:
JoelKatz
2013-03-03 02:09:19 -08:00
parent 0015716cb5
commit 51a85504a8
7 changed files with 70 additions and 10 deletions

View File

@@ -45,7 +45,7 @@ Application::Application() :
mSNTPClient(mAuxService), mRPCHandler(&mNetOps), mFeeTrack(),
mRpcDB(NULL), mTxnDB(NULL), mLedgerDB(NULL), mWalletDB(NULL), mHashNodeDB(NULL), mNetNodeDB(NULL),
mConnectionPool(mIOService), mPeerDoor(NULL), mRPCDoor(NULL), mWSPublicDoor(NULL), mWSPrivateDoor(NULL),
mSweepTimer(mAuxService)
mSweepTimer(mAuxService), mShutdown(false)
{
getRand(mNonce256.begin(), mNonce256.size());
getRand(reinterpret_cast<unsigned char *>(&mNonceST), sizeof(mNonceST));
@@ -58,6 +58,7 @@ bool Instance::running = true;
void Application::stop()
{
cLog(lsINFO) << "Received shutdown request";
mShutdown = true;
mIOService.stop();
mHashedObjectStore.bulkWrite();
mValidations.flush();