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.
This commit is contained in:
Michael Jumper committed 2022-03-02 20:35:52 +00:00
1 parent 402197863f
commit 8ebe13d085
1 file changed
+1 -1
@@ -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