From b2d2a172b61659c2fccef49dec11c71f8f0e71af Mon Sep 17 00:00:00 2001 From: ION606 Date: Sun, 15 Dec 2024 12:29:09 -0500 Subject: [PATCH] safeguard --- HTML/shell.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/HTML/shell.html b/HTML/shell.html index 411a1cb..dce5c50 100644 --- a/HTML/shell.html +++ b/HTML/shell.html @@ -93,7 +93,6 @@ console.log('Char height:', charHeight); console.log('Rows calculated:', Math.floor(container.clientHeight / charHeight)); - // Resize the terminal term.resize(cols, rows); } @@ -132,8 +131,9 @@ if (data.event) { switch (data.event) { case 'exit': - term.write('\r\nConnection closed. Redirecting...\r\n'); - setTimeout(() => window.location.pathname = '/login', 2000); + term.write('\r\nConnection closed. Refreshing...\r\n'); + ws.close(); + setTimeout(() => window.location.reload(), 2000); break; default: