Avoid counting failed connect attempts when probably offline.
This commit is contained in:
committed by
lateminer
parent
0dd7c98e63
commit
d3002718b5
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user