fix: Fixes random crashing when resizing the window.

This commit is contained in:
greysoh 2024-05-07 11:44:33 -04:00
parent 3a69222ee5
commit 56338544b5
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37

View file

@ -69,7 +69,10 @@ server.on("connection", client => {
// We're dumb. We don't really care. // We're dumb. We don't really care.
conn.on("pty", accept => accept()); conn.on("pty", accept => accept());
conn.on("window-change", accept => accept()); conn.on("window-change", accept => {
if (typeof accept != "function") return;
accept();
});
conn.on("shell", async accept => { conn.on("shell", async accept => {
const stream = accept(); const stream = accept();