mod_register_json/mod_register_json.lua
changeset 590 7df0d5c8abfd
parent 588 36b3ecebdc7e
child 607 121762432eb1
equal deleted inserted replaced
588:36b3ecebdc7e 590:7df0d5c8abfd
   120 			httpserver.new.http_servers[options.port].handlers[options.path or "register_account"] = nil
   120 			httpserver.new.http_servers[options.port].handlers[options.path or "register_account"] = nil
   121 		end
   121 		end
   122 	end
   122 	end
   123 
   123 
   124 	-- if there are no handlers left clean and close the socket, doesn't work with server_event
   124 	-- if there are no handlers left clean and close the socket, doesn't work with server_event
   125 	local event = require "core.configmanager".get("*", "core", "use_libevent");
   125 	local event = require "core.configmanager".get("*", "core", "use_libevent")
   126 
   126 
   127 	if not event then
   127 	if not event then
   128 		for _, options in ipairs(ports) do
   128 		for _, options in ipairs(ports) do
   129 			if options.port and not next(httpserver.new.http_servers[options.port].handlers) then
   129 			if options.port and not next(httpserver.new.http_servers[options.port].handlers) then
   130 				httpserver.new.http_servers[options.port] = nil
   130 				httpserver.new.http_servers[options.port] = nil