Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5abb83d

Browse files
committedAug 31, 2017
Clear registers before registering number_of_peers
1 parent 5f3e8ae commit 5abb83d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/http-api/routes/debug.js

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const client = require('prom-client')
66
// Endpoint for handling debug metrics
77
module.exports = (server) => {
88
const api = server.select('API')
9+
// Clear the register to make sure we're not registering multiple ones
10+
register.clear()
911
const gauge = new client.Gauge({ name: 'number_of_peers', help: 'the_number_of_currently_connected_peers' })
1012

1113
api.route({

0 commit comments

Comments
 (0)
This repository has been archived.