Fix a case where we timeout for no reason.

This commit is contained in:
JoelKatz
2013-07-12 00:11:27 -07:00
parent 8187c91ffa
commit ae50bf34aa

View File

@@ -153,6 +153,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 ();