mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
fixed disconnect check
This commit is contained in:
@@ -116,7 +116,7 @@ Sockets.init = function(server) {
|
|||||||
|
|
||||||
socket.on('disconnect', function() {
|
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) {
|
db.sortedSetRemove('users:online', uid, function(err) {
|
||||||
socketUser.isOnline(socket, uid, function(err, data) {
|
socketUser.isOnline(socket, uid, function(err, data) {
|
||||||
socket.broadcast.emit('user.isOnline', err, data);
|
socket.broadcast.emit('user.isOnline', err, data);
|
||||||
|
|||||||
Reference in New Issue
Block a user