v1.18.x
barisusakli 11 years ago
parent 962b141e85
commit 4e71c8328c

@ -173,6 +173,10 @@ Sockets.init = function(server) {
Sockets.logoutUser = function(uid) {
Sockets.getUserSockets(uid).forEach(function(socket) {
if (socket.handshake && socket.handshake.signedCookies && socket.handshake.signedCookies['express.sid']) {
db.sessionStore.destroy(socket.handshake.signedCookies['express.sid']);
}
socket.emit('event:disconnect');
socket.disconnect();
});

Loading…
Cancel
Save