aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/server.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-07 05:49:52 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-07 05:49:52 +0800
commita0cb1945aeac215b1909ff0063b66171ebe73c70 (patch)
treefc07f2354402ef786a4196c3a4d29be7d703806c /p2p/server.go
parentb719801db0bc80b49f05b249e2d4cf322c09eb24 (diff)
parent3e2a928caa74e523f43e14eec9918033ac1cbe0a (diff)
downloadgo-tangerine-a0cb1945aeac215b1909ff0063b66171ebe73c70.tar
go-tangerine-a0cb1945aeac215b1909ff0063b66171ebe73c70.tar.gz
go-tangerine-a0cb1945aeac215b1909ff0063b66171ebe73c70.tar.bz2
go-tangerine-a0cb1945aeac215b1909ff0063b66171ebe73c70.tar.lz
go-tangerine-a0cb1945aeac215b1909ff0063b66171ebe73c70.tar.xz
go-tangerine-a0cb1945aeac215b1909ff0063b66171ebe73c70.tar.zst
go-tangerine-a0cb1945aeac215b1909ff0063b66171ebe73c70.zip
Merge pull request #866 from fjl/p2p-last-minute
Last minute p2p fixes
Diffstat (limited to 'p2p/server.go')
-rw-r--r--p2p/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/p2p/server.go b/p2p/server.go
index 4a78e0bb9..5e0c917fc 100644
--- a/p2p/server.go
+++ b/p2p/server.go
@@ -428,7 +428,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() {