mod_http_stats_stream/mod_http_stats_stream.lua
changeset 3647 740870196b97
parent 3639 fd054689a64c
child 4599 bac3dae031ee
--- a/mod_http_stats_stream/mod_http_stats_stream.lua	Fri Aug 09 18:59:35 2019 +0200
+++ b/mod_http_stats_stream/mod_http_stats_stream.lua	Fri Aug 09 19:00:35 2019 +0200
@@ -1,3 +1,5 @@
+module:set_global();
+
 local statsman = require "core.statsmanager";
 local http = require "net.http.server";
 local json = require "util.json";
@@ -28,7 +30,7 @@
 end
 
 
-module:hook_global("stats-updated", function (event)
+module:hook("stats-updated", function (event)
 	local data = table.concat({
 		"event: stats-updated";
 		"data: "..json.encode(event.changed_stats);