From 82004aab73e5db6a4b0d3c6e68de7bec9dc6b749 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Mon, 14 Aug 2017 18:23:07 -0700 Subject: [PATCH] ioserver: change on disconnect to once to avoid double-counting --- src/io/ioserver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/ioserver.js b/src/io/ioserver.js index ae159cc7..18383b83 100644 --- a/src/io/ioserver.js +++ b/src/io/ioserver.js @@ -293,7 +293,7 @@ function emitMetrics(sock) { } }); - sock.on('disconnect', () => { + sock.once('disconnect', () => { try { promSocketCount.dec({ transport: transportName }); promSocketDisconnect.inc(1, new Date());