diff --git a/src/cpp/ripple/LedgerAcquire.cpp b/src/cpp/ripple/LedgerAcquire.cpp index 0dc34887e9..7db1a20afe 100644 --- a/src/cpp/ripple/LedgerAcquire.cpp +++ b/src/cpp/ripple/LedgerAcquire.cpp @@ -48,6 +48,7 @@ void PeerSet::setTimer() void PeerSet::invokeOnTimer() { + boost::recursive_mutex::scoped_lock sl(mLock); if (isDone()) return; @@ -71,8 +72,12 @@ void PeerSet::TimerEntry(boost::weak_ptr wptr, const boost::system::err { if (result == boost::asio::error::operation_aborted) return; + theApp->getJobQueue().addJob(jtLEDGER_DATA, "timerEntry", + boost::bind(&PeerSet::TimerJobEntry, _1, wptr)); +} - ScopedLock sl(theApp->getMasterLock()); +void PeerSet::TimerJobEntry(Job&, boost::weak_ptr wptr) +{ boost::shared_ptr ptr = wptr.lock(); if (ptr) ptr->invokeOnTimer(); diff --git a/src/cpp/ripple/LedgerAcquire.h b/src/cpp/ripple/LedgerAcquire.h index 78ab42994d..cb38f797f2 100644 --- a/src/cpp/ripple/LedgerAcquire.h +++ b/src/cpp/ripple/LedgerAcquire.h @@ -75,6 +75,7 @@ protected: private: static void TimerEntry(boost::weak_ptr, const boost::system::error_code& result); + static void TimerJobEntry(Job&, boost::weak_ptr); }; class LedgerAcquire :