mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUAC-963: Remove managed client when view is destroyed if client is no longer connected.
This commit is contained in:
		| @@ -709,6 +709,21 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams | ||||
|     // Clean up when view destroyed | ||||
|     $scope.$on('$destroy', function clientViewDestroyed() { | ||||
|  | ||||
|         // Remove client from client manager if no longer connected | ||||
|         var managedClient = $scope.client; | ||||
|         if (managedClient) { | ||||
|  | ||||
|             // Get current connection state | ||||
|             var connectionState = managedClient.clientState.connectionState; | ||||
|  | ||||
|             // If disconnected, remove from management | ||||
|             if (connectionState === ManagedClientState.ConnectionState.DISCONNECTED | ||||
|              || connectionState === ManagedClientState.ConnectionState.TUNNEL_ERROR | ||||
|              || connectionState === ManagedClientState.ConnectionState.CLIENT_ERROR) | ||||
|                 guacClientManager.removeManagedClient(managedClient.id); | ||||
|  | ||||
|         } | ||||
|  | ||||
|         // Hide any status dialog | ||||
|         $scope.showStatus(false); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user