Commit 7b99f70b authored by Joel Martin's avatar Joel Martin

Don't erase failed state error messages on disconnect.

parent 0166284a
......@@ -27,6 +27,7 @@
onblur="RFB.clipboardFocus=false;"></textarea>
</body>
<!-- Uncomment to activate firebug lite -->
<!--
<script type='text/javascript'
src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
......
......@@ -941,8 +941,12 @@ init_ws: function () {
console.log(">> WebSocket.onclose");
clearInterval(RFB.sendID);
if (RFB.state != 'disconnected') {
if (RFB.state == 'failed') {
RFB.updateState('disconnected');
} else {
RFB.updateState('disconnected', 'VNC disconnected');
}
}
console.log("<< WebSocket.onclose");
};
RFB.ws.onerror = function(e) {
......@@ -1005,7 +1009,11 @@ disconnect: function () {
}
}
if (RFB.state == 'failed') {
RFB.updateState('disconnected');
} else {
RFB.updateState('disconnected', 'Disconnected');
}
console.log("<< disconnect");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment