src/Tunnel.js
function failTunnel(status) {

            // Do not attempt to continue using next tunnel on server timeout
            if (status && status.code === Guacamole.Status.Code.UPSTREAM_TIMEOUT) {
                tunnels = [];
                return null;
            }

            // Get next tunnel
            var next_tunnel = tunnels.shift();

            // If there IS a next tunnel, try using it.
            if (next_tunnel) {
                tunnel.onerror = null;
                tunnel.oninstruction = null;
                tunnel.onstatechange = null;
                attach(next_tunnel);
            }

            return next_tunnel;

        }
function failTunnel(status) {

            // Do not attempt to continue using next tunnel on server timeout
            if (status && status.code === Guacamole.Status.Code.UPSTREAM_TIMEOUT) {
                tunnels = [];
                return null;
            }

            // Get next tunnel
            var next_tunnel = tunnels.shift();

            // If there IS a next tunnel, try using it.
            if (next_tunnel) {
                tunnel.onerror = null;
                tunnel.oninstruction = null;
                tunnel.onstatechange = null;
                attach(next_tunnel);
            }

            return next_tunnel;

        }
function failTunnel ( status ) { // Do not attempt to continue using next tunnel on server timeout if ( status && status . code === Guacamole . Status . Code . UPSTREAM_TIMEOUT ) { tunnels = [ ] ; return null ; } // Get next tunnel var next_tunnel = tunnels . shift ( ) ; // If there IS a next tunnel, try using it. if ( next_tunnel ) { tunnel . onerror = null ; tunnel . oninstruction = null ; tunnel . onstatechange = null ; attach ( next_tunnel ) ; } return next_tunnel ; }
Fails the currently-attached tunnel, attaching a new tunnel if
possible.

@private
@param {Guacamole.Status} [status]
An object representing the failure that occured in the
currently-attached tunnel, if known.

@return {Guacamole.Tunnel}
The next tunnel, or null if there are no more tunnels to try or
if no more tunnels should be tried.
Fails the currently - attached tunnel attaching a new tunnel if possible .