From: Michael Jumper Date: Sat, 10 Mar 2012 00:27:22 +0000 (-0800) Subject: Errors thrown by connect() of a chained tunnel should be resent to onerror() if caugh... X-Git-Url: http://git.alex.org.uk Errors thrown by connect() of a chained tunnel should be resent to onerror() if caught within ChainedTunnel.attach(). --- 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); + + } + }