Added a timeout to the app.js handler

This commit is contained in:
Mathias Wagner 2023-06-03 01:33:21 +02:00
parent 255d0920f2
commit d571fad487
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -16,7 +16,7 @@ module.exports = (io, socket) => {
connected = true;
socket.emit("login", {status: "success"});
}).connect({host: msg.host, port: msg.port || 22, username: msg.username || "root",
password: msg.password, privateKey: msg.privateKey
password: msg.password, privateKey: msg.privateKey, readyTimeout: 5000
}).on("error", (err) => {
socket.emit("login", {status: "failed", message: err.message});
});