From cc341b8734cf2c424b9b4adf7861400992755d7a Mon Sep 17 00:00:00 2001 From: Maran Date: Mon, 12 May 2014 16:36:14 +0200 Subject: Added debug message if you try to add a peer when max peers has been reached. --- ethereum.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ethereum.go') diff --git a/ethereum.go b/ethereum.go index 0f5bd11a2..bd391ba37 100644 --- a/ethereum.go +++ b/ethereum.go @@ -132,9 +132,13 @@ func (s *Ethereum) ServerCaps() Caps { func (s *Ethereum) AddPeer(conn net.Conn) { peer := NewPeer(conn, s, true) - if peer != nil && s.peers.Len() < s.MaxPeers { - s.peers.PushBack(peer) - peer.Start() + if peer != nil { + if s.peers.Len() < s.MaxPeers { + s.peers.PushBack(peer) + peer.Start() + } else { + ethutil.Config.Log.Debugf("[SERV] Max connected peers reached. Not adding incoming peer.") + } } } -- cgit