Avoid counting failed connect attempts when probably offline.

This commit is contained in:
Gregory Maxwell
2015-04-19 12:34:43 -07:00
committed by lateminer
parent 0dd7c98e63
commit d3002718b5
5 changed files with 17 additions and 17 deletions

View File

@@ -310,7 +310,7 @@ bool CAddrMan::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimeP
return fNew;
}
void CAddrMan::Attempt_(const CService& addr, int64_t nTime)
void CAddrMan::Attempt_(const CService& addr, bool fCountFailure, int64_t nTime)
{
CAddrInfo* pinfo = Find(addr);
@@ -326,7 +326,7 @@ void CAddrMan::Attempt_(const CService& addr, int64_t nTime)
// update info
info.nLastTry = nTime;
info.nAttempts++;
if (fCountFailure) info.nAttempts++;
}
CAddrInfo CAddrMan::Select_(bool newOnly)