mod_measure_memory: Module is global, no need for a global hook

Fri, 06 Jan 2017 17:07:01 +0100

author
Kim Alvefur <zash@zash.se>
date
Fri, 06 Jan 2017 17:07:01 +0100
changeset 2436
a01a3fb96302
parent 2435
05248d5a7166
child 2437
75be377b74ea

mod_measure_memory: Module is global, no need for a global hook

mod_measure_memory/mod_measure_memory.lua file | annotate | diff | comparison | revisions
--- a/mod_measure_memory/mod_measure_memory.lua	Sun Jan 08 06:26:21 2017 +0100
+++ b/mod_measure_memory/mod_measure_memory.lua	Fri Jan 06 17:07:01 2017 +0100
@@ -15,7 +15,7 @@
 end);
 
 if have_pposix and pposix.meminfo then
-	module:hook_global("stats-update", function ()
+	module:hook("stats-update", function ()
 		local m = measures;
 		for k, v in pairs(pposix.meminfo()) do
 			m[k](v);

mercurial