mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUAC-559: Notify when tunnel is disconnected. Ignore explicit disconnection status from Guacamole.Client.
This commit is contained in:
@@ -141,6 +141,12 @@
|
|||||||
GuacUI.Client.showError("Connection Error", message);
|
GuacUI.Client.showError("Connection Error", message);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Notify of disconnections (if not already notified of something else)
|
||||||
|
tunnel.onstatechange = function(state) {
|
||||||
|
if (state === Guacamole.Tunnel.State.CLOSED && !GuacUI.Client.visibleStatus)
|
||||||
|
GuacUI.Client.showStatus("Disconnected", "You have been disconnected. Reload the page to reconnect.");
|
||||||
|
};
|
||||||
|
|
||||||
// Connect
|
// Connect
|
||||||
guac.connect(connect_string);
|
guac.connect(connect_string);
|
||||||
|
|
||||||
|
@@ -890,16 +890,9 @@ GuacUI.Client.attach = function(guac) {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Disconnecting
|
// Disconnecting / disconnected are handled by tunnel instead
|
||||||
case 4:
|
case 4:
|
||||||
GuacUI.Client.showStatus(null, "Disconnecting...");
|
|
||||||
GuacUI.Client.titlePrefix = "[Disconnecting...]";
|
|
||||||
break;
|
|
||||||
|
|
||||||
// Disconnected
|
|
||||||
case 5:
|
case 5:
|
||||||
GuacUI.Client.showStatus("Disconnected", "Guacamole has been manually disconnected. Reload the page to reconnect.");
|
|
||||||
GuacUI.Client.titlePrefix = "[Disconnected]";
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Unknown status code
|
// Unknown status code
|
||||||
|
Reference in New Issue
Block a user