|
|
@ -173,6 +173,10 @@ Sockets.init = function(server) {
|
|
|
|
|
|
|
|
|
|
|
|
Sockets.logoutUser = function(uid) {
|
|
|
|
Sockets.logoutUser = function(uid) {
|
|
|
|
Sockets.getUserSockets(uid).forEach(function(socket) {
|
|
|
|
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.emit('event:disconnect');
|
|
|
|
socket.disconnect();
|
|
|
|
socket.disconnect();
|
|
|
|
});
|
|
|
|
});
|
|
|
|