Stop the peer to stop the mconn

This commit is contained in:
Jae Kwon 2015-07-20 15:02:12 -07:00
parent 571a134318
commit 1d362a71ed
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ func (sw *Switch) AddPeerWithConnection(conn net.Conn, outbound bool) (*Peer, er
// ignore if duplicate or if we already have too many for that IP range
if err := sw.peers.Add(peer); err != nil {
log.Notice("Ignoring peer", "error", err, "peer", peer)
peer.mconn.Stop()
peer.Stop()
return nil, err
}