mirror of
https://github.com/unraid/api.git
synced 2026-05-18 06:29:40 -05:00
@@ -300,10 +300,10 @@ module.exports = function (
|
||||
};
|
||||
},
|
||||
onDisconnect: webSocket => {
|
||||
const user = clients.get(webSocket);
|
||||
log.debug(`<ws> ${user.name} disconnected.`);
|
||||
|
||||
// If we don't wait a tick `user` becomes undefined.
|
||||
// const user = clients.get(webSocket);
|
||||
// log.debug(`<ws> ${user.name} disconnected.`);
|
||||
//
|
||||
// // If we don't wait a tick `user` becomes undefined.
|
||||
process.nextTick(() => {
|
||||
clients.delete(webSocket);
|
||||
});
|
||||
@@ -327,4 +327,4 @@ module.exports = function (
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user