From 9ab36d999efbb64efdf3f514f90490f634298553 Mon Sep 17 00:00:00 2001 From: peteruithoven Date: Wed, 16 Oct 2013 18:00:01 +0200 Subject: [PATCH] reset the status check when printer state is overruled --- js/Printer.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/Printer.js b/js/Printer.js index 0c15017..dbbfa87 100644 --- a/js/Printer.js +++ b/js/Printer.js @@ -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); } } \ No newline at end of file