Mercurial > prosody-modules
comparison mod_server_status/mod_server_status.lua @ 567:fe85e18a06cb
mod_server_status: revert to use module:get_option_boolean
author | Marco Cirillo <maranda@lightwitch.org> |
---|---|
date | Tue, 17 Jan 2012 13:53:49 +0000 |
parents | 0b52d82ea0b3 |
children | 00590d492a5b |
comparison
equal
deleted
inserted
replaced
566:39a612eb4431 | 567:fe85e18a06cb |
---|---|
136 if options.port then | 136 if options.port then |
137 httpserver.new.http_servers[options.port].handlers[options.path or "server-status"] = nil | 137 httpserver.new.http_servers[options.port].handlers[options.path or "server-status"] = nil |
138 end | 138 end |
139 end | 139 end |
140 | 140 |
141 local event = require "core.configmanager".get("*", "core", "use_libevent"); | 141 local event = module:get_option_boolen("use_libevent", false) |
142 | 142 |
143 -- if there're no handlers left clean the socket, not sure if it works with server_select | 143 -- if there're no handlers left clean the socket, not sure if it works with server_select |
144 if not event then | 144 if not event then |
145 for _, options in ipairs(ports) do | 145 for _, options in ipairs(ports) do |
146 if options.port and not next(httpserver.new.http_servers[options.port].handlers) then | 146 if options.port and not next(httpserver.new.http_servers[options.port].handlers) then |