Fix a case where we timeout for no reason.

This commit is contained in:
JoelKatz
2013-07-12 00:11:27 -07:00
parent 8ef791c7ef
commit 248f5b789e

View File

@@ -154,6 +154,18 @@ void InboundLedger::onTimer (bool progress)
if (!progress)
{
if (isDone())
{
WriteLog (lsINFO, InboundLedger) << "Already done " << mHash;
return;
}
checkLocal();
if (isDone())
{
WriteLog (lsINFO, InboundLedger) << "Completed fetch " << mHash;
return;
}
mAggressive = true;
mByHash = true;
int pc = getPeerCount ();