Use Guacamole.ChainedTunnel when WebSocket is available (to safely fall back to HTTP if WebSocket fails).

This commit is contained in:
Michael Jumper
2012-03-09 16:12:49 -08:00
parent 6a52434b12
commit 5953e8f140

View File

@@ -105,7 +105,10 @@
// If WebSocket available, try to use it.
if (window.WebSocket)
tunnel = new Guacamole.WebSocketTunnel("websocket-tunnel")
tunnel = new Guacamole.ChainedTunnel(
new Guacamole.WebSocketTunnel("websocket-tunnel"),
new Guacamole.HTTPTunnel("tunnel")
);
// If no WebSocket, then use HTTP.
else