From 079475e4912d9ff6ee0424022ce981d9a01fd549 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 17 May 2015 12:24:13 -0700 Subject: [PATCH] Only touch InboundLedgers on success so failed acquires can expire --- src/ripple/app/ledger/InboundLedgers.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ripple/app/ledger/InboundLedgers.cpp b/src/ripple/app/ledger/InboundLedgers.cpp index ea80c100b..5a16f7f68 100644 --- a/src/ripple/app/ledger/InboundLedgers.cpp +++ b/src/ripple/app/ledger/InboundLedgers.cpp @@ -67,9 +67,13 @@ public: auto it = mLedgers.find (hash); if (it != mLedgers.end ()) { - it->second->update (seq); - if (it->second->isComplete() && !it->second->isFailed()) - ret = it->second->getLedger(); + // Don't touch failed acquires so they can expire + if (! it->second->isFailed ()) + { + it->second->update (seq); + if (it->second->isComplete ()) + ret = it->second->getLedger (); + } } else