[pve-devel] [PATCH xtermjs] to not try to reconnect the host shell

Dominik Csapak d.csapak at proxmox.com
Mon May 7 14:20:33 CEST 2018


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/www/main.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/www/main.js b/src/www/main.js
index 6fec72f..51e6160 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";
@@ -266,7 +266,7 @@ 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') {
-- 
2.11.0




More information about the pve-devel mailing list