mirror of https://github.com/calzoneman/sync.git
ioserver: change on disconnect to once to avoid double-counting
This commit is contained in:
parent
82bd645781
commit
82004aab73
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue