Explorar o código

Merge pull request #2034 from karalabe/always-allow-dyndials

p2p: always allow dynamic dials if network not disabled
Jeffrey Wilcke %!s(int64=10) %!d(string=hai) anos
pai
achega
2a3322ea14
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      p2p/server.go

+ 1 - 1
p2p/server.go

@@ -337,7 +337,7 @@ func (srv *Server) Start() (err error) {
 		srv.ntab = ntab
 	}
 
-	dynPeers := srv.MaxPeers / 2
+	dynPeers := (srv.MaxPeers + 1) / 2
 	if !srv.Discovery {
 		dynPeers = 0
 	}