diff options
| author | Gregory Maxwell <[email protected]> | 2015-04-19 13:39:38 -0700 |
|---|---|---|
| committer | Gregory Maxwell <[email protected]> | 2016-05-26 12:56:32 +0000 |
| commit | 6182d10503ae3af222a7e4575724dce7ef563fec (patch) | |
| tree | 1d3eb65c41fee943ae7c2cfcc8873188a1ffaab7 /src/net.cpp | |
| parent | Avoid counting failed connect attempts when probably offline. (diff) | |
| download | discoin-6182d10503ae3af222a7e4575724dce7ef563fec.tar.xz discoin-6182d10503ae3af222a7e4575724dce7ef563fec.zip | |
Do not increment nAttempts by more than one for every Good connection.
This slows the increase of the nAttempts in addrman while partitioned,
even if the node hasn't yet noticed the partitioning.
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index f30321869..c15a4692e 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1633,7 +1633,7 @@ void ThreadOpenConnections() } if (addrConnect.IsValid()) - OpenNetworkConnection(addrConnect, (int)setConnected.size() >= min(nMaxConnections - 1, 2), &grant); + OpenNetworkConnection(addrConnect, (int)setConnected.size() >= std::min(nMaxConnections - 1, 2), &grant); } } |