metrics: fix pubsub_peers add metric
This commit is contained in:
parent
fcda0f6ce1
commit
c7895ccc52
|
@ -144,6 +144,10 @@ proc getOrCreatePeer(p: PubSub,
|
||||||
|
|
||||||
p.peers[peer.id] = peer
|
p.peers[peer.id] = peer
|
||||||
peer.observers = p.observers
|
peer.observers = p.observers
|
||||||
|
|
||||||
|
# metrics
|
||||||
|
libp2p_pubsub_peers.set(p.peers.len.int64)
|
||||||
|
|
||||||
return peer
|
return peer
|
||||||
|
|
||||||
method handleConn*(p: PubSub,
|
method handleConn*(p: PubSub,
|
||||||
|
|
Loading…
Reference in New Issue