This commit is contained in:
lolcat 2024-11-03 01:58:23 -04:00
parent 9ffa9f703c
commit 782d28cba5
1 changed files with 6 additions and 6 deletions

View File

@ -309,6 +309,12 @@ async function handshake(name, password){
ws.once("open", function(){ ws.once("open", function(){
deek.emit("login"); deek.emit("login");
ws._socket.setTimeout(10000);
ws._socket.on("timeout", function(){
deek.emit("error", "timed out")
});
}); });
ws.once("close", function(){ ws.once("close", function(){
@ -409,12 +415,6 @@ async function handshake(name, password){
deek.emit("error", "code=" + code + " reason=" + reason); deek.emit("error", "code=" + code + " reason=" + reason);
}); });
ws._socket.setTimeout(10000);
ws._socket.on("timeout", function(){
deek.emit("error", "timed out")
});
} }
/* /*