Cleanly destroy Application on exit

This commit is contained in:
Vinnie Falco
2013-06-30 04:21:07 -07:00
parent 68179cfce3
commit 0deaeb1000
42 changed files with 949 additions and 926 deletions

View File

@@ -14,7 +14,7 @@ PeerSet::PeerSet (uint256 const& hash, int interval)
, mFailed (false)
, mProgress (true)
, mAggressive (false)
, mTimer (theApp->getIOService ())
, mTimer (getApp().getIOService ())
{
mLastAction = UptimeTimer::getInstance ().getElapsedSeconds ();
assert ((mTimerInterval > 10) && (mTimerInterval < 30000));
@@ -74,7 +74,7 @@ void PeerSet::TimerEntry (boost::weak_ptr<PeerSet> wptr, const boost::system::er
if (ptr)
{
int jc = theApp->getJobQueue ().getJobCountTotal (jtLEDGER_DATA);
int jc = getApp().getJobQueue ().getJobCountTotal (jtLEDGER_DATA);
if (jc > 4)
{
@@ -82,7 +82,7 @@ void PeerSet::TimerEntry (boost::weak_ptr<PeerSet> wptr, const boost::system::er
ptr->setTimer ();
}
else
theApp->getJobQueue ().addJob (jtLEDGER_DATA, "timerEntry", BIND_TYPE (&PeerSet::TimerJobEntry, P_1, ptr));
getApp().getJobQueue ().addJob (jtLEDGER_DATA, "timerEntry", BIND_TYPE (&PeerSet::TimerJobEntry, P_1, ptr));
}
}