Skip to content

Commit

Permalink
Patch for Change Request in #324
Browse files Browse the repository at this point in the history
  • Loading branch information
HollowMan6 committed Jul 3, 2020
1 parent b4e2d15 commit 57546b3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion app/terminal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,16 @@

window.addEventListener("resize", sendSizeToServer);
}
socket.onclose = () => {}

socket.onmessage = (msg) => {
if(msg==="Closing"){
socket.close();
}
}

socket.onclose = () => {
window.close();
}
socket.onerror = () => {}
</script>
</body>
Expand Down
4 changes: 3 additions & 1 deletion app/terminal/server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
this.Pty = require("node-pty");
this.Websocket = require("ws").Server;

this.onclosed = () => {};
this.onclosed = () => {
ws.send("Closing");
};
this.onopened = () => {};
this.onresize = () => {};
this.ondisconnected = () => {};
Expand Down

0 comments on commit 57546b3

Please sign in to comment.