don't check if peers have `sendConn` when disconnecting for bad scoring
This commit is contained in:
parent
51d8cd4ade
commit
922cd92f94
|
@ -82,7 +82,6 @@ proc disconnectPeer(g: GossipSub, peer: PubSubPeer) {.async.} =
|
||||||
else:
|
else:
|
||||||
libp2p_gossipsub_bad_score_disconnection.inc(labelValues = ["unknown"])
|
libp2p_gossipsub_bad_score_disconnection.inc(labelValues = ["unknown"])
|
||||||
|
|
||||||
if peer.sendConn != nil:
|
|
||||||
try:
|
try:
|
||||||
await g.switch.disconnect(peer.peerId)
|
await g.switch.disconnect(peer.peerId)
|
||||||
except CancelledError:
|
except CancelledError:
|
||||||
|
|
Loading…
Reference in New Issue