fix issue

pull/330/head
vapao 2021-04-28 15:34:40 +08:00
parent 3b8e448a96
commit edc2328a20
1 changed files with 1 additions and 6 deletions

View File

@ -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]})));