Browse Source

Stop the peer to stop the mconn

pull/118/head
Jae Kwon 10 years ago
parent
commit
1d362a71ed
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      p2p/switch.go

+ 1
- 1
p2p/switch.go 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
}


Loading…
Cancel
Save