CI fix handleDisconnect (pubsub)

This commit is contained in:
Giovanni Petrantoni 2020-07-09 13:56:59 +09:00
parent 9b8b159abb
commit f9e0a1f069
1 changed files with 1 additions and 2 deletions

View File

@ -62,9 +62,8 @@ type
method handleDisconnect*(p: PubSub, peer: PubSubPeer) {.base.} =
## handle peer disconnects
##
if peer.id in p.peers:
if not isNil(peer.peerInfo) and peer.id in p.peers:
trace "deleting peer", peer = peer.id
p.peers[peer.id] = nil
p.peers.del(peer.id)
# metrics