From 828c45eb4839db7fa7027c0bb78e2ba2c754524b Mon Sep 17 00:00:00 2001 From: Vasile Popescu Date: Thu, 17 May 2018 23:24:23 +0200 Subject: [PATCH] Force the browser to reload when closing the session After reload, the browser will be forced to display the page which says the session doesn't exist anymore. This is a temporary solution, before a better way to tell the user the connection has been closed will be --- frontend/tty-receiver/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/tty-receiver/main.js b/frontend/tty-receiver/main.js index 369f231..4f2c3b4 100644 --- a/frontend/tty-receiver/main.js +++ b/frontend/tty-receiver/main.js @@ -38,7 +38,7 @@ term.write("$"); connection.onclose = function(evt) { console.log("Got the WS closed: ", evt); - term.write("disconnected"); + window.location.reload(); } connection.onmessage = function(evt) {