diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-05-18 04:22:51 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-05-18 04:22:51 +0100 |
commit | f44fcd324948662a1bab4b9a2b562ff79cd67c60 (patch) | |
tree | 0ad843f882da9ddce5b3fd679d4ee6074de02c3f | |
parent | 3faa06e9d4652e62a9eacd8c0baec85d3a3d4488 (diff) | |
download | prosody-f44fcd324948662a1bab4b9a2b562ff79cd67c60.tar.gz prosody-f44fcd324948662a1bab4b9a2b562ff79cd67c60.zip |
util.watchdog: Pass watchdog object to callback so that it doesn't always have to be a closure
-rw-r--r-- | util/watchdog.lua | 2 |
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); |