From c4840d204fd151d5dd6c71beacd88403b0e9e00b 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(). --- src/main/resources/tunnel.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/resources/tunnel.js b/src/main/resources/tunnel.js index 5b5a167..8729b8a 100644 --- a/src/main/resources/tunnel.js +++ b/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); + + } + } -- 1.7.10.4