Signed-off-by: Dominik Csapak <[email protected]>
---
changes from v1:
* fixed subject (s/to/do/)
* removed unecessary else branch
 src/www/main.js | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/www/main.js b/src/www/main.js
index ac437f8..1081390 100644
--- a/src/www/main.js
+++ b/src/www/main.js
@@ -58,7 +58,7 @@ function updateState(newState, msg) {
                case states.disconnecting:
                    var time_since_started = new Date() - starttime;
                    timeout = 5000;
-                   if (time_since_started > 5*1000) {
+                   if (time_since_started > 5*1000 || type === 'shell') {
                        message = "Connection closed";
                    } else {
                        message = "Connection failed";
@@ -273,14 +273,9 @@ function checkMigration() {
 function tryReconnect() {
     var time_since_started = new Date() - starttime;
     var type = getQueryParameter('console');
-    if (time_since_started < 5*1000) { // 5 seconds
+    if (time_since_started < 5*1000 || type === 'shell') { // 5 seconds
        stopTerminal();
        return;
-    } else if (type === 'shell') {
-       updateState(states.reconnecting, 'trying to reconnect...');
-       setTimeout(function() {
-           location.reload();
-       }, 1000);
     }
 
     updateState(states.disconnecting, 'Detecting migration...');
-- 
2.11.0


_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to