Skip to content

Commit

Permalink
Drop UI.rfb reference on all disconnects
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
CendioOssman committed Jan 25, 2018
1 parent 42463da commit d1aeb43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,6 @@ var UI = {

UI.updateVisualState('disconnecting');

UI.rfb = undefined;

// Don't display the connection settings until we're actually disconnected
},

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit d1aeb43

Please sign in to comment.