mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
Only chain to next tunnel if no instructions received. Pass through errors otherwise.
This commit is contained in:
@@ -674,7 +674,16 @@ Guacamole.ChainedTunnel = function() {
|
|||||||
|
|
||||||
// Wrap own oninstruction within current tunnel
|
// Wrap own oninstruction within current tunnel
|
||||||
current_tunnel.oninstruction = function(opcode, elements) {
|
current_tunnel.oninstruction = function(opcode, elements) {
|
||||||
|
|
||||||
|
// Invoke handler
|
||||||
chained_tunnel.oninstruction(opcode, elements);
|
chained_tunnel.oninstruction(opcode, elements);
|
||||||
|
|
||||||
|
// Use handler permanently from now on
|
||||||
|
current_tunnel.oninstruction = chained_tunnel.oninstruction;
|
||||||
|
|
||||||
|
// Pass through errors (without trying other tunnels)
|
||||||
|
current_tunnel.onerror = chained_tunnel.onerror;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Attach next tunnel on error
|
// Attach next tunnel on error
|
||||||
|
Reference in New Issue
Block a user