]> git.proxmox.com Git - pve-xtermjs.git/commitdiff
do not try to reconnect the host shell
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 7 May 2018 13:06:55 +0000 (15:06 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 7 May 2018 13:09:59 +0000 (15:09 +0200)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/www/main.js

index ac437f8730e05813868f071e452c15a2a32e5d34..1081390086432ba844dabea5f3b3b3d14d15573c 100644 (file)
@@ -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...');