added disconnect event

This commit is contained in:
cubedro 2015-02-18 08:05:58 +02:00
parent 1feeab33b9
commit 5d0d5d1576

View File

@ -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);