From c7c243764154d6e988d8e9642cf0d40b33f3bc16 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 4 Jan 2015 23:45:45 -0800 Subject: [PATCH] GUAC-985: Update history entries when client disconnects. Do not rely on tunnel closure. --- .../main/webapp/app/client/types/ManagedClient.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/guacamole/src/main/webapp/app/client/types/ManagedClient.js b/guacamole/src/main/webapp/app/client/types/ManagedClient.js index d73b49981..26fe249b1 100644 --- a/guacamole/src/main/webapp/app/client/types/ManagedClient.js +++ b/guacamole/src/main/webapp/app/client/types/ManagedClient.js @@ -285,9 +285,6 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', // Connection has closed case Guacamole.Tunnel.State.CLOSED: - - updateHistoryEntry(managedClient); - ManagedClientState.setConnectionState(managedClient.clientState, ManagedClientState.ConnectionState.DISCONNECTED); break; @@ -309,6 +306,10 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', ManagedClientState.ConnectionState.IDLE); break; + // Ignore "connecting" state + case 1: // Connecting + break; + // Connected + waiting case 2: ManagedClientState.setConnectionState(managedClient.clientState, @@ -321,12 +322,10 @@ angular.module('client').factory('ManagedClient', ['$rootScope', '$injector', ManagedClientState.ConnectionState.CONNECTED); break; - // Connecting, disconnecting, and disconnected are all - // either ignored or handled by tunnel state - - case 1: // Connecting + // Update history when disconnecting case 4: // Disconnecting case 5: // Disconnected + updateHistoryEntry(managedClient); break; }