listen disconnect event, display unknow socket method name on dev

This commit is contained in:
barisusakli
2014-10-26 14:30:13 -04:00
parent dfae2ea0d7
commit 63cf8d674d
2 changed files with 8 additions and 1 deletions

View File

@@ -172,6 +172,10 @@ Loader.addClusterEvents = function(callback) {
}
});
cluster.on('disconnect', function(worker) {
console.log('[cluster] Child Process (' + worker.process.pid + ') has disconnected');
});
callback();
}

View File

@@ -214,7 +214,10 @@ Sockets.init = function(server) {
}, Namespaces);
if(!methodToCall) {
return winston.warn('[socket.io] Unrecognized message: ' + payload.name);
if (process.env.NODE_ENV === 'development') {
winston.warn('[socket.io] Unrecognized message: ' + payload.name);
}
return;
}
if (Namespaces[namespace].before) {