From d147b61530a6019ad7cb7adb751b330d2a9a857e Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Fri, 14 Sep 2012 10:06:23 -0700 Subject: [PATCH] The ledger accept process calls functions like ConnectionPool::relayMessage and so must be called in the main I/O thread, at least for now. --- src/LedgerConsensus.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/LedgerConsensus.cpp b/src/LedgerConsensus.cpp index 9cfa4fd23..aff9f7bda 100644 --- a/src/LedgerConsensus.cpp +++ b/src/LedgerConsensus.cpp @@ -909,8 +909,7 @@ void LedgerConsensus::beginAccept() } theApp->getOPs().newLCL(mPeerPositions.size(), mCurrentMSeconds, mNewLedgerHash); - boost::thread thread(boost::bind(&LedgerConsensus::Saccept, shared_from_this(), consensusSet)); - thread.detach(); + theApp->getIOService().post(boost::bind(&LedgerConsensus::Saccept, shared_from_this(), consensusSet)); } void LedgerConsensus::Saccept(boost::shared_ptr This, SHAMap::pointer txSet)