online count fixes for cluster

This commit is contained in:
barisusakli
2014-09-04 17:41:00 -04:00
parent 8a996c4524
commit 98f338b41c
6 changed files with 82 additions and 47 deletions

View File

@@ -76,11 +76,7 @@ User.banUser = function(uid, callback) {
return callback(err);
}
var sockets = websockets.getUserSockets(uid);
for(var i=0; i<sockets.length; ++i) {
sockets[i].emit('event:banned');
}
websockets.in('uid_' + uid).emit('event:banned');
websockets.logoutUser(uid);
callback();