comparison mod_stanza_counter/mod_stanza_counter_http.lua @ 568:3d66b0af9a15

mod_stanza_counter_http: revert to use module:get_option_boolean
author Marco Cirillo <maranda@lightwitch.org>
date Tue, 17 Jan 2012 13:58:13 +0000
parents b3f8435e661c
children 03be4622454f
comparison
equal deleted inserted replaced
567:fe85e18a06cb 568:3d66b0af9a15
51 httpserver.new.http_servers[options.port].handlers[options.path or "stanza-counter"] = nil 51 httpserver.new.http_servers[options.port].handlers[options.path or "stanza-counter"] = nil
52 end 52 end
53 end 53 end
54 54
55 -- if there are no handlers left clean and close the socket, doesn't work with server_event 55 -- if there are no handlers left clean and close the socket, doesn't work with server_event
56 local event = require "core.configmanager".get("*", "core", "use_libevent") 56 local event = module:get_option_boolen("use_libevent", false)
57 57
58 if not event then 58 if not event then
59 for _, options in ipairs(ports) do 59 for _, options in ipairs(ports) do
60 if options.port and not next(httpserver.new.http_servers[options.port].handlers) then 60 if options.port and not next(httpserver.new.http_servers[options.port].handlers) then
61 httpserver.new.http_servers[options.port] = nil 61 httpserver.new.http_servers[options.port] = nil