diff options
Diffstat (limited to 'p2p/server.go')
-rw-r--r-- | p2p/server.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/p2p/server.go b/p2p/server.go index 58b76a708..c1cf0f9fe 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -808,6 +808,7 @@ running: } name := truncateName(c.name) srv.log.Debug("Adding p2p peer", "name", name, "addr", c.fd.RemoteAddr(), "peers", len(peers)+1) + peerCounts.Update(int64((len(peers) + 1))) go srv.runPeer(p) peers[c.node.ID()] = p if p.Inbound() { @@ -830,6 +831,7 @@ running: if pd.Inbound() { inboundCount-- } + peerCounts.Update(int64(len(peers))) } } |