From 8ebe13d085aaad80d67ca0826c5c7564a6c10554 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 2 Mar 2022 17:22:06 +0000 Subject: [PATCH] GUACAMOLE-1545: Ensure tunnel "onload" fires only for true state changes. Previously, the state of the tunnel implementations was initialized to "CONNECTING", which is incorrect and may result in (1) initial state changes to "CONNECTING" not firing "onstatechange" and (2) the state change to "CLOSED" incorrectly firing when initially connecting, despite there not being an established connection. --- guacamole-common-js/src/main/webapp/modules/Tunnel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guacamole-common-js/src/main/webapp/modules/Tunnel.js b/guacamole-common-js/src/main/webapp/modules/Tunnel.js index 2565bd0b0..677c570bf 100644 --- a/guacamole-common-js/src/main/webapp/modules/Tunnel.js +++ b/guacamole-common-js/src/main/webapp/modules/Tunnel.js @@ -104,7 +104,7 @@ Guacamole.Tunnel = function() { * * @type {!number} */ - this.state = Guacamole.Tunnel.State.CONNECTING; + this.state = Guacamole.Tunnel.State.CLOSED; /** * The maximum amount of time to wait for data to be received, in