Errors thrown by connect() of a chained tunnel should be resent to onerror() if caugh...
authorMichael Jumper <zhangmaike@users.sourceforge.net>
Sat, 10 Mar 2012 00:27:22 +0000 (16:27 -0800)
committerMichael Jumper <zhangmaike@users.sourceforge.net>
Sat, 10 Mar 2012 00:27:22 +0000 (16:27 -0800)
src/main/resources/tunnel.js

index 5b5a167..8729b8a 100644 (file)
@@ -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);
+            
+        }
+
 
     }