diff --git a/src/socket.io/index.js b/src/socket.io/index.js index f135245009..c62fd2f9c6 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -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);