Do the same thing for timer entry.

This commit is contained in:
JoelKatz
2013-03-15 22:50:26 -07:00
parent e392366c63
commit f222544048
2 changed files with 7 additions and 1 deletions

View File

@@ -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();

View File

@@ -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 :