diff --git a/p2p/switch.go b/p2p/switch.go index ed5c8b720..4a5191c78 100644 --- a/p2p/switch.go +++ b/p2p/switch.go @@ -320,9 +320,6 @@ func (sw *Switch) Peers() IPeerSet { // TODO: make record depending on reason. func (sw *Switch) StopPeerForError(peer Peer, reason interface{}) { sw.Logger.Error("Stopping peer for error", "peer", peer, "err", reason) - if peer == nil { - return - } sw.stopAndRemovePeer(peer, reason) if peer.IsPersistent() {