Diff

util/watchdog.lua @ 4891:189cfe565d03

util.watchdog: Pass watchdog object to callback so that it doesn't always have to be a closure
author Matthew Wild <mwild1@gmail.com>
date Fri, 18 May 2012 04:22:51 +0100
parent 4401:0ed617f58404
child 6777:5de6b93d0190
line wrap: on
line diff
--- 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);