mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 09:03:21 +00:00 
			
		
		
		
	GUAC-1126: Clear managed connections, if any, upon login. New sessions should start with a clean environment (fixes GUAC-1066).
This commit is contained in:
		| @@ -127,14 +127,22 @@ angular.module('client').factory('guacClientManager', ['$injector', | ||||
|  | ||||
|     }; | ||||
|  | ||||
|     // Disconnect all clients when window is unloaded | ||||
|     $window.addEventListener('unload', function disconnectAllClients() { | ||||
|     /** | ||||
|      * Disconnects and removes all currently-connected clients. | ||||
|      */ | ||||
|     service.clear = function clear() { | ||||
|  | ||||
|         // Disconnect each managed client | ||||
|         for (var id in service.managedClients) | ||||
|             service.managedClients[id].client.disconnect(); | ||||
|  | ||||
|     }); | ||||
|         // Clear managed clients | ||||
|         service.managedClients = {}; | ||||
|  | ||||
|     }; | ||||
|  | ||||
|     // Disconnect all clients when window is unloaded | ||||
|     $window.addEventListener('unload', service.clear); | ||||
|  | ||||
|     return service; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user