diff options
author | Samuel Mannehed <samuel@cendio.se> | 2016-09-02 12:03:16 +0200 |
---|---|---|
committer | Samuel Mannehed <samuel@cendio.se> | 2016-10-01 01:30:02 +0200 |
commit | 52e9cc48b0118cbe3f9e6ab73a90325fd658ea9b (patch) | |
tree | e4a6ba093049eacd120d29f6ed40bf766a85f887 | |
parent | c00ee156b9a612bb18ed2b6a4bc5d115f3e56914 (diff) | |
download | novnc-52e9cc48b0118cbe3f9e6ab73a90325fd658ea9b.tar.gz |
Clean up log output on state changes
-rw-r--r-- | core/rfb.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/core/rfb.js b/core/rfb.js index 87442e6..1a15831 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -463,14 +463,18 @@ Util.Error('Fatal error, cannot continue'); } - var cmsg = typeof(statusMsg) !== 'undefined' ? (" Msg: " + statusMsg) : ""; - var fullmsg = "New state '" + state + "', was '" + oldstate + "'." + cmsg; - if (state === 'failed' || state === 'fatal') { - Util.Error(cmsg); - } else { - Util.Warn(cmsg); + if (typeof(statusMsg) !== 'undefined') { + var cmsg = " Msg: " + statusMsg; + if (state === 'failed' || state === 'fatal') { + Util.Error(cmsg); + } else { + Util.Warn(cmsg); + } } + var smsg = "New state '" + state + "', was '" + oldstate + "'."; + Util.Debug(smsg); + if (this._disconnTimer && state !== 'disconnect') { Util.Debug("Clearing disconnect timer"); clearTimeout(this._disconnTimer); |