Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
Clear registers before registering number_of_peers
Browse files Browse the repository at this point in the history
  • Loading branch information
victorb committed Aug 30, 2017
1 parent 963bf5d commit 7eb8369
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/http-api/routes/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const client = require('prom-client')
// Endpoint for handling debug metrics
module.exports = (server) => {
const api = server.select('API')
// Clear the register to make sure we're not registering multiple ones
register.clear()
const gauge = new client.Gauge({ name: 'number_of_peers', help: 'the_number_of_currently_connected_peers' })

api.route({
Expand Down

0 comments on commit 7eb8369

Please sign in to comment.