mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-05 05:27:35 +08:00
optimize(radixtree_host_uri): reuse empty function. (#937)
This commit is contained in:
parent
2e7f41e503
commit
678142e051
@ -83,6 +83,9 @@ local function push_host_router(route, host_routes, only_uri_routes)
|
||||
end
|
||||
|
||||
|
||||
local function empty_func() end
|
||||
|
||||
|
||||
local function create_radixtree_router(routes)
|
||||
local host_routes = {}
|
||||
local only_uri_routes = {}
|
||||
@ -102,8 +105,7 @@ local function create_radixtree_router(routes)
|
||||
filter_fun = function(vars, opts, ...)
|
||||
return sub_router:dispatch(vars.uri, opts, ...)
|
||||
end,
|
||||
handler = function (api_ctx)
|
||||
end
|
||||
handler = empty_func,
|
||||
})
|
||||
end
|
||||
if #host_router_routes > 0 then
|
||||
|
Loading…
Reference in New Issue
Block a user