mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Cleanly destroy Application on exit
This commit is contained in:
@@ -18,9 +18,9 @@ TransactionAcquire::TransactionAcquire (uint256 const& hash) : PeerSet (hash, TX
|
||||
|
||||
static void TACompletionHandler (uint256 hash, SHAMap::pointer map)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock sl (theApp->getMasterLock ());
|
||||
theApp->getOPs ().mapComplete (hash, map);
|
||||
theApp->getInboundLedgers ().dropLedger (hash);
|
||||
boost::recursive_mutex::scoped_lock sl (getApp().getMasterLock ());
|
||||
getApp().getOPs ().mapComplete (hash, map);
|
||||
getApp().getInboundLedgers ().dropLedger (hash);
|
||||
}
|
||||
|
||||
void TransactionAcquire::done ()
|
||||
@@ -39,7 +39,7 @@ void TransactionAcquire::done ()
|
||||
map = mMap;
|
||||
}
|
||||
|
||||
theApp->getIOService ().post (BIND_TYPE (&TACompletionHandler, mHash, map));
|
||||
getApp().getIOService ().post (BIND_TYPE (&TACompletionHandler, mHash, map));
|
||||
}
|
||||
|
||||
void TransactionAcquire::onTimer (bool progress)
|
||||
@@ -50,9 +50,9 @@ void TransactionAcquire::onTimer (bool progress)
|
||||
{
|
||||
WriteLog (lsWARNING, TransactionAcquire) << "Ten timeouts on TX set " << getHash ();
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock sl (theApp->getMasterLock ());
|
||||
boost::recursive_mutex::scoped_lock sl (getApp().getMasterLock ());
|
||||
|
||||
if (theApp->getOPs ().stillNeedTXSet (mHash))
|
||||
if (getApp().getOPs ().stillNeedTXSet (mHash))
|
||||
{
|
||||
WriteLog (lsWARNING, TransactionAcquire) << "Still need it";
|
||||
mTimeouts = 0;
|
||||
@@ -74,7 +74,7 @@ void TransactionAcquire::onTimer (bool progress)
|
||||
WriteLog (lsWARNING, TransactionAcquire) << "Out of peers for TX set " << getHash ();
|
||||
|
||||
bool found = false;
|
||||
std::vector<Peer::pointer> peerList = theApp->getPeers ().getPeerVector ();
|
||||
std::vector<Peer::pointer> peerList = getApp().getPeers ().getPeerVector ();
|
||||
BOOST_FOREACH (Peer::ref peer, peerList)
|
||||
{
|
||||
if (peer->hasTxSet (getHash ()))
|
||||
|
||||
Reference in New Issue
Block a user