aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/watchdog.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/watchdog.lua b/util/watchdog.lua
index 6eb2e602..407028a5 100644
--- a/util/watchdog.lua
+++ b/util/watchdog.lua
@@ -19,7 +19,10 @@ local function new(timeout, callback)
return watchdog;
end
-function watchdog_methods:reset()
+function watchdog_methods:reset(new_timeout)
+ if new_timeout then
+ self.timeout = new_timeout;
+ end
if self.timer_id then
timer.reschedule(self.timer_id, self.timeout+1);
else