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 @@ ...@@ -27,6 +27,7 @@
onblur="RFB.clipboardFocus=false;"></textarea> onblur="RFB.clipboardFocus=false;"></textarea>
</body> </body>
<!-- Uncomment to activate firebug lite -->
<!-- <!--
<script type='text/javascript' <script type='text/javascript'
src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script> src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
......
...@@ -941,7 +941,11 @@ init_ws: function () { ...@@ -941,7 +941,11 @@ init_ws: function () {
console.log(">> WebSocket.onclose"); console.log(">> WebSocket.onclose");
clearInterval(RFB.sendID); clearInterval(RFB.sendID);
if (RFB.state != 'disconnected') { if (RFB.state != 'disconnected') {
RFB.updateState('disconnected', 'VNC disconnected'); if (RFB.state == 'failed') {
RFB.updateState('disconnected');
} else {
RFB.updateState('disconnected', 'VNC disconnected');
}
} }
console.log("<< WebSocket.onclose"); console.log("<< WebSocket.onclose");
}; };
...@@ -1005,7 +1009,11 @@ disconnect: function () { ...@@ -1005,7 +1009,11 @@ disconnect: function () {
} }
} }
RFB.updateState('disconnected', 'Disconnected'); if (RFB.state == 'failed') {
RFB.updateState('disconnected');
} else {
RFB.updateState('disconnected', 'Disconnected');
}
console.log("<< disconnect"); 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