From b11445e8dd717c73c2a5e3713324cfb7e8e6b7dc Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 9 Mar 2012 16:27:22 -0800 Subject: [PATCH] Errors thrown by connect() of a chained tunnel should be resent to onerror() if caught within ChainedTunnel.attach(). --- guacamole-common-js/src/main/resources/tunnel.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/guacamole-common-js/src/main/resources/tunnel.js b/guacamole-common-js/src/main/resources/tunnel.js index 5b5a167aa..8729b8ab8 100644 --- a/guacamole-common-js/src/main/resources/tunnel.js +++ b/guacamole-common-js/src/main/resources/tunnel.js @@ -729,8 +729,19 @@ Guacamole.ChainedTunnel = function(tunnel_chain) { }; - // Attempt connection - current_tunnel.connect(connect_data); + try { + + // Attempt connection + current_tunnel.connect(connect_data); + + } + catch (e) { + + // Call error handler of current tunnel on error + current_tunnel.onerror(e.message); + + } + }