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.
This commit is contained in:
parent
42463da166
commit
d1aeb43551
|
@ -1048,8 +1048,6 @@ var UI = {
|
||||||
|
|
||||||
UI.updateVisualState('disconnecting');
|
UI.updateVisualState('disconnecting');
|
||||||
|
|
||||||
UI.rfb = undefined;
|
|
||||||
|
|
||||||
// Don't display the connection settings until we're actually disconnected
|
// 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.disconnect() won't be used in those cases.
|
||||||
UI.connected = false;
|
UI.connected = false;
|
||||||
|
|
||||||
|
UI.rfb = undefined;
|
||||||
|
|
||||||
if (!e.detail.clean) {
|
if (!e.detail.clean) {
|
||||||
UI.updateVisualState('disconnected');
|
UI.updateVisualState('disconnected');
|
||||||
if (wasConnected) {
|
if (wasConnected) {
|
||||||
|
|
Loading…
Reference in New Issue