Show close code and reason.
Also add commented out web-socket-js debug variable in include/websock.js
This commit is contained in:
parent
06a9ef0c6c
commit
b688a909b0
|
@ -225,7 +225,10 @@ function constructor() {
|
||||||
fail("Got unexpected WebSockets connection");
|
fail("Got unexpected WebSockets connection");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ws.on('close', function() {
|
ws.on('close', function(e) {
|
||||||
|
if (e.code) {
|
||||||
|
Util.Info("Close code: " + e.code + ", reason: " + e.reason + ", wasClean: " + e.wasClean);
|
||||||
|
}
|
||||||
if (rfb_state === 'disconnect') {
|
if (rfb_state === 'disconnect') {
|
||||||
updateState('disconnected', 'VNC disconnected');
|
updateState('disconnected', 'VNC disconnected');
|
||||||
} else if (rfb_state === 'ProtocolVersion') {
|
} else if (rfb_state === 'ProtocolVersion') {
|
||||||
|
|
|
@ -24,6 +24,10 @@ if (window.WebSocket) {
|
||||||
window.WebSocket = window.MozWebSocket;
|
window.WebSocket = window.MozWebSocket;
|
||||||
} else {
|
} else {
|
||||||
/* no builtin WebSocket so load web_socket.js */
|
/* no builtin WebSocket so load web_socket.js */
|
||||||
|
|
||||||
|
// To enable debug:
|
||||||
|
// window.WEB_SOCKET_DEBUG=1;
|
||||||
|
|
||||||
Websock_native = false;
|
Websock_native = false;
|
||||||
(function () {
|
(function () {
|
||||||
function get_INCLUDE_URI() {
|
function get_INCLUDE_URI() {
|
||||||
|
|
Loading…
Reference in New Issue