From e8dc94a31329e4f9ab85298887523aaf39d3df76 Mon Sep 17 00:00:00 2001 From: Stuart Caunt Date: Mon, 9 Dec 2024 15:09:17 +0100 Subject: [PATCH] Fix handling of change of guacamole tunnel states: previously used the "open" tunnel state (1) to show the "connecting" screen - this should be the "connecting" tunnel state (0). After the unstable "state" is corrected, guacamole fires an "open" tunnel state which generated to presentation of the connecting screen. Fixes #3. --- src/app/user/instance/instance.component.ts | 1 - .../vdi/services/guacamole-virtual-desktop-manager.service.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/user/instance/instance.component.ts b/src/app/user/instance/instance.component.ts index 16fd0ed..8e3bf46 100644 --- a/src/app/user/instance/instance.component.ts +++ b/src/app/user/instance/instance.component.ts @@ -297,7 +297,6 @@ export class InstanceComponent implements OnInit, OnDestroy { } else { const tunnel = this.accountService.createGuacamoleRemoteDesktopTunnel(token, this.eventsGateway.clientId); - tunnel.unstableThreshold = 10000; this.manager = new GuacamoleVirtualDesktopManager(tunnel); } return true; diff --git a/src/app/vdi/services/guacamole-virtual-desktop-manager.service.ts b/src/app/vdi/services/guacamole-virtual-desktop-manager.service.ts index f1544e7..66059db 100644 --- a/src/app/vdi/services/guacamole-virtual-desktop-manager.service.ts +++ b/src/app/vdi/services/guacamole-virtual-desktop-manager.service.ts @@ -223,7 +223,7 @@ export class GuacamoleVirtualDesktopManager extends VirtualDesktopManager { private handleTunnelStateChange(state: number): void { switch (state) { // Connection is being established - case 1: + case 0: this.setState(VirtualDesktopManager.STATE.CONNECTING); break; // Connection has closed