mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
In chained tunnel, clear handlers in old tunnel when new tunnel is taking over.
This commit is contained in:
@@ -707,6 +707,12 @@ Guacamole.ChainedTunnel = function(tunnel_chain) {
|
|||||||
*/
|
*/
|
||||||
function attach(tunnel) {
|
function attach(tunnel) {
|
||||||
|
|
||||||
|
// Clear handlers of current tunnel, if any
|
||||||
|
if (current_tunnel) {
|
||||||
|
current_tunnel.onerror = null;
|
||||||
|
current_tunnel.oninstruction = null;
|
||||||
|
}
|
||||||
|
|
||||||
// Set own functions to tunnel's functions
|
// Set own functions to tunnel's functions
|
||||||
chained_tunnel.disconnect = tunnel.disconnect;
|
chained_tunnel.disconnect = tunnel.disconnect;
|
||||||
chained_tunnel.sendMessage = tunnel.sendMessage;
|
chained_tunnel.sendMessage = tunnel.sendMessage;
|
||||||
|
Reference in New Issue
Block a user