mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-02-03 08:34:49 +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])]))
|
sent.add(peer.send(@[RPCMsg(messages: @[msg])]))
|
||||||
else:
|
else:
|
||||||
# Notice this needs a better fix! for now it's a hack
|
# 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:
|
if topic in g.mesh:
|
||||||
g.mesh[topic].excl(p)
|
g.mesh[topic].excl(p)
|
||||||
if topic in g.fanout:
|
if topic in g.fanout:
|
||||||
|
@ -100,6 +100,7 @@ method rpcHandler*(p: PubSub,
|
|||||||
method handleDisconnect*(p: PubSub, peer: PubSubPeer) {.async, base.} =
|
method handleDisconnect*(p: PubSub, peer: PubSubPeer) {.async, base.} =
|
||||||
## handle peer disconnects
|
## handle peer disconnects
|
||||||
if peer.id in p.peers:
|
if peer.id in p.peers:
|
||||||
|
trace "deleting peer", id = peer.id
|
||||||
p.peers.del(peer.id)
|
p.peers.del(peer.id)
|
||||||
|
|
||||||
# metrics
|
# metrics
|
||||||
|
Loading…
x
Reference in New Issue
Block a user