reset the status check when printer state is overruled

This commit is contained in:
peteruithoven 2013-10-16 18:00:01 +02:00
parent 1df94100f3
commit 9ab36d999e
1 changed files with 8 additions and 0 deletions

View File

@ -267,5 +267,13 @@ function Printer() {
self.state = newState;
$(document).trigger(Printer.UPDATE);
this.resetStatusCheckInterval();
}
this.resetStatusCheckInterval = function() {
console.log("resetStatusCheckInterval");
clearTimeout(self.checkStatusDelay);
clearTimeout(self.retryCheckStatusDelay);
self.checkStatusDelay = setTimeout(function() { self.checkStatus() }, self.checkStatusInterval);
}
}