good morning!!!!

Skip to content
Snippets Groups Projects
Commit cc341b87 authored by Maran Hidskes's avatar Maran Hidskes
Browse files

Added debug message if you try to add a peer when max peers has been reached.

parent 52b664b0
No related branches found
No related tags found
No related merge requests found
......@@ -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.")
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment