Fix some cases where the acquire engine can stall.

This commit is contained in:
JoelKatz
2012-12-25 21:05:12 -08:00
parent f685e9e9ee
commit be2e55d49c
4 changed files with 64 additions and 7 deletions

View File

@@ -1176,8 +1176,13 @@ void Ledger::pendSave(bool fromConsensus)
void Ledger::decPendingSaves()
{
boost::recursive_mutex::scoped_lock sl(sPendingSaveLock);
--sPendingSaves;
{
boost::recursive_mutex::scoped_lock sl(sPendingSaveLock);
--sPendingSaves;
if (sPendingSaves != 0)
return;
}
theApp->getLedgerMaster().resumeAcquiring();
}
void Ledger::ownerDirDescriber(SLE::ref sle, const uint160& owner)