diff --git a/app/terminal/index.html b/app/terminal/index.html
index efb98da..7855196 100644
--- a/app/terminal/index.html
+++ b/app/terminal/index.html
@@ -121,7 +121,16 @@
window.addEventListener("resize", sendSizeToServer);
}
- socket.onclose = () => {}
+
+ socket.onmessage = (msg) => {
+ if(msg==="Closing"){
+ socket.close();
+ }
+ }
+
+ socket.onclose = () => {
+ window.close();
+ }
socket.onerror = () => {}