mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-02-03 00:24:00 +00:00
better diagnostics
This commit is contained in:
parent
27d22d534d
commit
0d0309a601
@ -480,7 +480,7 @@ method publish*(g: GossipSub,
|
||||
sent.add(peer.send(@[RPCMsg(messages: @[msg])]))
|
||||
else:
|
||||
# Notice this needs a better fix! for now it's a hack
|
||||
error "publish: peer or peerInfo was nil"
|
||||
error "publish: peer or peerInfo was nil", missing = p
|
||||
if topic in g.mesh:
|
||||
g.mesh[topic].excl(p)
|
||||
if topic in g.fanout:
|
||||
|
@ -100,6 +100,7 @@ method rpcHandler*(p: PubSub,
|
||||
method handleDisconnect*(p: PubSub, peer: PubSubPeer) {.async, base.} =
|
||||
## handle peer disconnects
|
||||
if peer.id in p.peers:
|
||||
trace "deleting peer", id = peer.id
|
||||
p.peers.del(peer.id)
|
||||
|
||||
# metrics
|
||||
|
Loading…
x
Reference in New Issue
Block a user