Fix a case where the engine to acquire published ledgers stalls.

This commit is contained in:
JoelKatz
2013-07-15 00:51:53 -07:00
parent b1bdfb07b2
commit 160ba88049

View File

@@ -752,7 +752,14 @@ void LedgerMaster::tryPublish ()
ledger = acq->getLedger(); ledger = acq->getLedger();
} }
else else
{
WriteLog (lsWARNING, LedgerMaster) << "Failed to acquire a published ledger"; WriteLog (lsWARNING, LedgerMaster) << "Failed to acquire a published ledger";
getApp().getInboundLedgers().dropLedger(hash);
acq = getApp().getInboundLedgers().findCreate(hash, seq);
acq->setAccept();
if (acq->isDone())
ledger = acq->getLedger();
}
} }
if (ledger && (ledger->getLedgerSeq() == (mPubLedger->getLedgerSeq() + 1))) if (ledger && (ledger->getLedgerSeq() == (mPubLedger->getLedgerSeq() + 1)))