mod_register_json/mod_register_json.lua
changeset 566 39a612eb4431
parent 563 cd5581b58fdc
child 586 1004d7176be2
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