From 3e2a928caa74e523f43e14eec9918033ac1cbe0a Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 6 May 2015 23:44:51 +0200 Subject: [PATCH] p2p: stop dialing at half the maximum peer count --- p2p/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/server.go b/p2p/server.go index e648c72c97..98a2edd7c2 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -360,7 +360,7 @@ func (srv *Server) dialLoop() { case <-refresh.C: // Grab some nodes to connect to if we're not at capacity. srv.lock.RLock() - needpeers := len(srv.peers) < srv.MaxPeers + needpeers := len(srv.peers) < srv.MaxPeers/2 srv.lock.RUnlock() if needpeers { go func() {