mod_register_json: switched module:get_option_boolean("use_libevent", nil) with require "core.configmanager".get("*", "core", "use_libevent") as the first possibly won't work (module is unloaded)
authorMarco Cirillo <maranda@lightwitch.org>
Tue, 17 Jan 2012 01:31:58 +0000
changeset 563 cd5581b58fdc
parent 562 b3f8435e661c
child 564 0b52d82ea0b3
mod_register_json: switched module:get_option_boolean("use_libevent", nil) with require "core.configmanager".get("*", "core", "use_libevent") as the first possibly won't work (module is unloaded)
mod_register_json/mod_register_json.lua
--- a/mod_register_json/mod_register_json.lua	Tue Jan 17 01:27:38 2012 +0000
+++ b/mod_register_json/mod_register_json.lua	Tue Jan 17 01:31:58 2012 +0000
@@ -125,7 +125,7 @@
 	end
 
 	-- if there are no handlers left clean and close the socket, doesn't work with server_event
-	local event = module:get_option_boolean("use_libevent", nil)
+	local event = require "core.configmanager".get("*", "core", "use_libevent")
 
 	if not event then
 		for _, options in ipairs(ports) do