From edc2328a2019cff7fdf3a7dc775e57107bbad327 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 28 Apr 2021 15:34:40 +0800 Subject: [PATCH] fix issue --- spug_web/src/pages/ssh/Terminal.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/spug_web/src/pages/ssh/Terminal.js b/spug_web/src/pages/ssh/Terminal.js index a1ccdb2..c8f6a8c 100644 --- a/spug_web/src/pages/ssh/Terminal.js +++ b/spug_web/src/pages/ssh/Terminal.js @@ -27,12 +27,7 @@ function WebSSH(props) { fitPlugin.fit(); }; socket.onclose = e => { - if (e.code === 3333) { - window.location.href = "about:blank"; - window.close() - } else { - setTimeout(() => term.write('\r\nConnection is closed.\r\n'), 200) - } + setTimeout(() => term.write('\r\nConnection is closed.\r\n'), 200) }; term.onData(data => socket.send(JSON.stringify({data}))); term.onResize(({cols, rows}) => socket.send(JSON.stringify({resize: [cols, rows]})));