mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-29 15:35:50 +00:00
Fix a race condition that can cause a crash on startup.
This commit is contained in:
@@ -49,10 +49,6 @@ Application::Application() :
|
|||||||
{
|
{
|
||||||
getRand(mNonce256.begin(), mNonce256.size());
|
getRand(mNonce256.begin(), mNonce256.size());
|
||||||
getRand(reinterpret_cast<unsigned char *>(&mNonceST), sizeof(mNonceST));
|
getRand(reinterpret_cast<unsigned char *>(&mNonceST), sizeof(mNonceST));
|
||||||
mJobQueue.setThreadCount();
|
|
||||||
mSweepTimer.expires_from_now(boost::posix_time::seconds(10));
|
|
||||||
mSweepTimer.async_wait(boost::bind(&Application::sweep, this));
|
|
||||||
mLoadMgr.init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern const char *RpcDBInit[], *TxnDBInit[], *LedgerDBInit[], *WalletDBInit[], *HashNodeDBInit[], *NetNodeDBInit[];
|
extern const char *RpcDBInit[], *TxnDBInit[], *LedgerDBInit[], *WalletDBInit[], *HashNodeDBInit[], *NetNodeDBInit[];
|
||||||
@@ -88,6 +84,11 @@ void sigIntHandler(int)
|
|||||||
|
|
||||||
void Application::setup()
|
void Application::setup()
|
||||||
{
|
{
|
||||||
|
mJobQueue.setThreadCount();
|
||||||
|
mSweepTimer.expires_from_now(boost::posix_time::seconds(10));
|
||||||
|
mSweepTimer.async_wait(boost::bind(&Application::sweep, this));
|
||||||
|
mLoadMgr.init();
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#ifdef SIGINT
|
#ifdef SIGINT
|
||||||
if (!theConfig.RUN_STANDALONE)
|
if (!theConfig.RUN_STANDALONE)
|
||||||
|
|||||||
Reference in New Issue
Block a user