clearTimeout instead of clearInterval for timers

We create timeouts, not intervals. Then we need to clear them with
clearTimeout.
This commit is contained in:
Anton Lundin 2013-08-02 09:56:15 +02:00
parent 292f6a5da7
commit c39df031d8
1 changed files with 3 additions and 3 deletions

View File

@ -403,7 +403,7 @@ updateState = function(state, statusMsg) {
}
if (msgTimer) {
clearInterval(msgTimer);
clearTimeout(msgTimer);
msgTimer = null;
}
@ -444,13 +444,13 @@ updateState = function(state, statusMsg) {
if (connTimer && (rfb_state !== 'connect')) {
Util.Debug("Clearing connect timer");
clearInterval(connTimer);
clearTimeout(connTimer);
connTimer = null;
}
if (disconnTimer && (rfb_state !== 'disconnect')) {
Util.Debug("Clearing disconnect timer");
clearInterval(disconnTimer);
clearTimeout(disconnTimer);
disconnTimer = null;
}