network: consider handshaked peers only when comparing with MinPeers
We don't know a lot about non-handshaked ones, so it's safer to try more connection.
This commit is contained in:
parent
f8949564c8
commit
6ba4afc977
1 changed files with 1 additions and 1 deletions
|
@ -409,7 +409,7 @@ func (s *Server) run() {
|
|||
// "Optimal" number of peers.
|
||||
optimalN = s.discovery.GetFanOut() * 2
|
||||
// Real number of peers.
|
||||
peerN = s.PeerCount()
|
||||
peerN = s.HandshakedPeersCount()
|
||||
)
|
||||
|
||||
if peerN < s.MinPeers {
|
||||
|
|
Loading…
Reference in a new issue