fixed disconnect check

This commit is contained in:
Baris Soner Usakli
2014-03-04 13:28:24 -05:00
parent 3c97ef6829
commit b28e4846a4

View File

@@ -116,7 +116,7 @@ Sockets.init = function(server) {
socket.on('disconnect', function() {
if (uid && !Sockets.getUserSockets(uid).length <= 1) {
if (uid && Sockets.getUserSockets(uid).length <= 1) {
db.sortedSetRemove('users:online', uid, function(err) {
socketUser.isOnline(socket, uid, function(err, data) {
socket.broadcast.emit('user.isOnline', err, data);