From d1aeb435515579c73beaf3641aec0ff5ec322e70 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 25 Jan 2018 15:32:22 +0100 Subject: [PATCH] Drop UI.rfb reference on all disconnects We can be disconnected because of server reasons, not just because someone clicked the disconnect button. Make sure we clean up the reference and get a proper state in those cases as well. --- app/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ui.js b/app/ui.js index e39b3f08..5fc1ce45 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1048,8 +1048,6 @@ var UI = { UI.updateVisualState('disconnecting'); - UI.rfb = undefined; - // Don't display the connection settings until we're actually disconnected }, @@ -1102,6 +1100,8 @@ var UI = { // UI.disconnect() won't be used in those cases. UI.connected = false; + UI.rfb = undefined; + if (!e.detail.clean) { UI.updateVisualState('disconnected'); if (wasConnected) {