mirror of
https://github.com/tendermint/tendermint.git
synced 2025-12-23 14:25:19 +00:00
p2p: remove nil guard (#4901)
https://github.com/tendermint/tendermint/pull/4893#discussion_r430940912
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user