comparison mod_register_json/mod_register_json.lua @ 566:39a612eb4431

mod_register_json: revert to use module:get_option_boolean
author Marco Cirillo <maranda@lightwitch.org>
date Tue, 17 Jan 2012 13:52:48 +0000
parents cd5581b58fdc
children 1004d7176be2
comparison
equal deleted inserted replaced
565:9c2eea631811 566:39a612eb4431
123 httpserver.new.http_servers[options.port].handlers[options.path or "register_account"] = nil 123 httpserver.new.http_servers[options.port].handlers[options.path or "register_account"] = nil
124 end 124 end
125 end 125 end
126 126
127 -- if there are no handlers left clean and close the socket, doesn't work with server_event 127 -- if there are no handlers left clean and close the socket, doesn't work with server_event
128 local event = require "core.configmanager".get("*", "core", "use_libevent") 128 local event = module:get_option_boolen("use_libevent", false)
129 129
130 if not event then 130 if not event then
131 for _, options in ipairs(ports) do 131 for _, options in ipairs(ports) do
132 if options.port and not next(httpserver.new.http_servers[options.port].handlers) then 132 if options.port and not next(httpserver.new.http_servers[options.port].handlers) then
133 httpserver.new.http_servers[options.port] = nil 133 httpserver.new.http_servers[options.port] = nil