mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUAC-985: Update history entries when client disconnects. Do not rely on tunnel closure.
This commit is contained in:
@@ -285,9 +285,6 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector',
|
|||||||
|
|
||||||
// Connection has closed
|
// Connection has closed
|
||||||
case Guacamole.Tunnel.State.CLOSED:
|
case Guacamole.Tunnel.State.CLOSED:
|
||||||
|
|
||||||
updateHistoryEntry(managedClient);
|
|
||||||
|
|
||||||
ManagedClientState.setConnectionState(managedClient.clientState,
|
ManagedClientState.setConnectionState(managedClient.clientState,
|
||||||
ManagedClientState.ConnectionState.DISCONNECTED);
|
ManagedClientState.ConnectionState.DISCONNECTED);
|
||||||
break;
|
break;
|
||||||
@@ -309,6 +306,10 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector',
|
|||||||
ManagedClientState.ConnectionState.IDLE);
|
ManagedClientState.ConnectionState.IDLE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Ignore "connecting" state
|
||||||
|
case 1: // Connecting
|
||||||
|
break;
|
||||||
|
|
||||||
// Connected + waiting
|
// Connected + waiting
|
||||||
case 2:
|
case 2:
|
||||||
ManagedClientState.setConnectionState(managedClient.clientState,
|
ManagedClientState.setConnectionState(managedClient.clientState,
|
||||||
@@ -321,12 +322,10 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector',
|
|||||||
ManagedClientState.ConnectionState.CONNECTED);
|
ManagedClientState.ConnectionState.CONNECTED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Connecting, disconnecting, and disconnected are all
|
// Update history when disconnecting
|
||||||
// either ignored or handled by tunnel state
|
|
||||||
|
|
||||||
case 1: // Connecting
|
|
||||||
case 4: // Disconnecting
|
case 4: // Disconnecting
|
||||||
case 5: // Disconnected
|
case 5: // Disconnected
|
||||||
|
updateHistoryEntry(managedClient);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user