From dcd3f2f4db8a7127ef803e480125cc871071b84c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 19 Mar 2012 15:11:05 -0700 Subject: [PATCH] In chained tunnel, clear handlers in old tunnel when new tunnel is taking over. --- src/main/resources/tunnel.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/resources/tunnel.js b/src/main/resources/tunnel.js index b81c418..a35d007 100644 --- a/src/main/resources/tunnel.js +++ b/src/main/resources/tunnel.js @@ -707,6 +707,12 @@ Guacamole.ChainedTunnel = function(tunnel_chain) { */ 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 chained_tunnel.disconnect = tunnel.disconnect; chained_tunnel.sendMessage = tunnel.sendMessage; -- 1.7.10.4