From 9dd81bcc6651587285bc69efd560412729343c75 Mon Sep 17 00:00:00 2001 From: Cryptkeeper Date: Fri, 18 Dec 2015 19:04:30 -0600 Subject: [PATCH] Fix handling --- app.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index a866b4a..dfd65d4 100644 --- a/app.js +++ b/app.js @@ -154,16 +154,16 @@ function startServices() { }, 1); // Attach our listeners. - client.on('disconnect', function(client) { + client.on('disconnect', function() { connectedClients -= 1; logger.log('info', 'Client disconnected, total clients: %d', connectedClients); }); - }); - server.io.on('requestHistoryGraph', function(client) { - // Send them the big 24h graph. - client.emit('historyGraph', graphData); + client.on('requestHistoryGraph', function() { + // Send them the big 24h graph. + client.emit('historyGraph', graphData); + }); }); startMainLoop();