mirror of https://github.com/status-im/op-geth.git
Added debug message if you try to add a peer when max peers has been reached.
This commit is contained in:
parent
52b664b0ae
commit
cc341b8734
10
ethereum.go
10
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.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue