mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Do the same thing for timer entry.
This commit is contained in:
@@ -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<PeerSet> 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<PeerSet> wptr)
|
||||
{
|
||||
boost::shared_ptr<PeerSet> ptr = wptr.lock();
|
||||
if (ptr)
|
||||
ptr->invokeOnTimer();
|
||||
|
||||
@@ -75,6 +75,7 @@ protected:
|
||||
|
||||
private:
|
||||
static void TimerEntry(boost::weak_ptr<PeerSet>, const boost::system::error_code& result);
|
||||
static void TimerJobEntry(Job&, boost::weak_ptr<PeerSet>);
|
||||
};
|
||||
|
||||
class LedgerAcquire :
|
||||
|
||||
Reference in New Issue
Block a user