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
2022-03-02 17:22:06 +00:00
parent 402197863f
commit 8ebe13d085

View File

@@ -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