disable stuff that crashes in socket.io 1.x

This commit is contained in:
barisusakli
2014-11-25 15:18:33 -05:00
parent 396dffd60f
commit 4bed05a622
3 changed files with 6 additions and 5 deletions

View File

@@ -159,7 +159,7 @@ var opts = {
/*
* Restore all hijacked sockets to their original emit/on functions
*/
var clients = socket.io.sockets.clients();
var clients = []; //socket.io.sockets.clients(); doesn't work in socket.io 1.x
clients.forEach(function(client) {
if(client.oEmit && client.oEmit !== client.emit) {
client.emit = client.oEmit;
@@ -179,7 +179,7 @@ var opts = {
return;
}
var clients = socket.io.sockets.clients();
var clients = []; //socket.io.sockets.clients(); doesn't work in socket.io 1.x
clients.forEach(function(client) {
Logger.io_one(client, client.uid);