Avoid counting failed connect attempts when probably offline.
This commit is contained in:
committed by
lateminer
parent
0dd7c98e63
commit
d3002718b5
@@ -230,7 +230,7 @@ protected:
|
||||
bool Add_(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty);
|
||||
|
||||
//! Mark an entry as attempted to connect.
|
||||
void Attempt_(const CService &addr, int64_t nTime);
|
||||
void Attempt_(const CService &addr, bool fCountFailure, int64_t nTime);
|
||||
|
||||
//! Select an address to connect to, if newOnly is set to true, only the new table is selected from.
|
||||
CAddrInfo Select_(bool newOnly);
|
||||
@@ -521,12 +521,12 @@ public:
|
||||
}
|
||||
|
||||
//! Mark an entry as connection attempted to.
|
||||
void Attempt(const CService &addr, int64_t nTime = GetAdjustedTime())
|
||||
void Attempt(const CService &addr, bool fCountFailure, int64_t nTime = GetAdjustedTime())
|
||||
{
|
||||
{
|
||||
LOCK(cs);
|
||||
Check();
|
||||
Attempt_(addr, nTime);
|
||||
Attempt_(addr, fCountFailure, nTime);
|
||||
Check();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user