aboutsummaryrefslogtreecommitdiffstats
path: root/util/watchdog.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-05-18 04:22:51 +0100
committerMatthew Wild <mwild1@gmail.com>2012-05-18 04:22:51 +0100
commitf44fcd324948662a1bab4b9a2b562ff79cd67c60 (patch)
tree0ad843f882da9ddce5b3fd679d4ee6074de02c3f /util/watchdog.lua
parent3faa06e9d4652e62a9eacd8c0baec85d3a3d4488 (diff)
downloadprosody-f44fcd324948662a1bab4b9a2b562ff79cd67c60.tar.gz
prosody-f44fcd324948662a1bab4b9a2b562ff79cd67c60.zip
util.watchdog: Pass watchdog object to callback so that it doesn't always have to be a closure
Diffstat (limited to 'util/watchdog.lua')
-rw-r--r--util/watchdog.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/watchdog.lua b/util/watchdog.lua
index 96031415..bcb2e274 100644
--- a/util/watchdog.lua
+++ b/util/watchdog.lua
@@ -16,7 +16,7 @@ function new(timeout, callback)
end
local time_left = (last_reset + timeout) - current_time;
if time_left < 0 then
- return watchdog.callback();
+ return watchdog:callback();
end
return time_left + 1;
end);