From 9c5b0715560c82f3753f4f27405e7a04ec56be87 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sat, 8 Feb 2014 11:04:14 -0800 Subject: [PATCH] Fix crash on exit in ~InboundLedger --- src/ripple_app/main/Application.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ripple_app/main/Application.cpp b/src/ripple_app/main/Application.cpp index 2ca890cfe..204e9b55e 100644 --- a/src/ripple_app/main/Application.cpp +++ b/src/ripple_app/main/Application.cpp @@ -127,13 +127,13 @@ public: OrderBookDB m_orderBookDB; std::unique_ptr m_pathRequests; std::unique_ptr m_ledgerMaster; + std::unique_ptr m_inboundLedgers; std::unique_ptr m_networkOPs; std::unique_ptr m_deprecatedUNL; std::unique_ptr m_rpcHTTPServer; RPCServerHandler m_rpcServerHandler; std::unique_ptr m_nodeStore; std::unique_ptr m_sntpClient; - std::unique_ptr m_inboundLedgers; std::unique_ptr m_txQueue; std::unique_ptr m_validators; std::unique_ptr mFeatures; @@ -261,6 +261,11 @@ public: , m_ledgerMaster (LedgerMaster::New ( *m_jobQueue, LogPartition::getJournal ())) + // VFALCO NOTE must come before NetworkOPs to prevent a crash due + // to dependencies in the destructor. + // + , m_inboundLedgers (InboundLedgers::New (get_seconds_clock (), *m_jobQueue)) + // VFALCO NOTE Does NetworkOPs depend on LedgerMaster? , m_networkOPs (NetworkOPs::New (get_seconds_clock (), *m_ledgerMaster, *m_jobQueue, LogPartition::getJournal ())) @@ -279,8 +284,6 @@ public: , m_sntpClient (SNTPClient::New (*this)) - , m_inboundLedgers (InboundLedgers::New (get_seconds_clock (), *m_jobQueue)) - , m_txQueue (TxQueue::New ()) , m_validators (add (Validators::Manager::New (