ioserver: change on disconnect to once to avoid double-counting

This commit is contained in:
Calvin Montgomery 2017-08-14 18:23:07 -07:00
parent 82bd645781
commit 82004aab73

View file

@ -293,7 +293,7 @@ function emitMetrics(sock) {
} }
}); });
sock.on('disconnect', () => { sock.once('disconnect', () => {
try { try {
promSocketCount.dec({ transport: transportName }); promSocketCount.dec({ transport: transportName });
promSocketDisconnect.inc(1, new Date()); promSocketDisconnect.inc(1, new Date());