blob: 13cbd5fc55528d8fd232697ff27ef66ea09c6757 (
plain)
1
2
3
4
5
6
7
8
9
10
|
module.exports = (socket) => {
setTimeout(() => {
if (data[socket.id] && socket.authenticated === null) {
socket.send(JSON.stringify({error:"TIMED_OUT", success: false, device: null}));
console.log("[" + socket.id + "] Connection timed out");
rateLimits[socket.ip] = new Date();
socket.close();
}
}, 2000)
}
|