From 5d0d5d1576fb7996641788b3d9cdcfbdf532aa22 Mon Sep 17 00:00:00 2001 From: cubedro Date: Wed, 18 Feb 2015 08:05:58 +0200 Subject: [PATCH] added disconnect event --- lib/node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node.js b/lib/node.js index 2dad557..58d35c2 100644 --- a/lib/node.js +++ b/lib/node.js @@ -16,7 +16,7 @@ Socket = Primus.createSocket({ var INSTANCE_NAME, ETH_VERSION; -if(process.env.NODE_ENV == 'production') +if(process.env.NODE_ENV === 'production') { INSTANCE_NAME = shelljs.exec('ec2metadata --instance-id', {silent: true}).output; ETH_VERSION = shelljs.exec('eth -V', {silent: true}).output; @@ -364,7 +364,7 @@ Node.prototype.init = function() Node.prototype.stop = function() { if(this._socket) - socket.end(socket.id); + socket.end(); if(this.updateInterval) clearInterval(this.updateInterval);