# HG changeset patch # User Matthew Wild # Date 1337311371 -3600 # Node ID 189cfe565d036a7f3cf234865fb065a0fa4f594e # Parent 7d4ec960995798104500bc42e8395011fb1dd5f0 util.watchdog: Pass watchdog object to callback so that it doesn't always have to be a closure diff -r 7d4ec9609957 -r 189cfe565d03 util/watchdog.lua --- a/util/watchdog.lua Fri May 18 01:50:51 2012 +0100 +++ b/util/watchdog.lua Fri May 18 04:22:51 2012 +0100 @@ -16,7 +16,7 @@ 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);