diff --git a/kong/runloop/handler.lua b/kong/runloop/handler.lua index aa948b202e2..b51cb7a9f90 100644 --- a/kong/runloop/handler.lua +++ b/kong/runloop/handler.lua @@ -992,8 +992,30 @@ return { if strategy ~= "off" or kong.sync then local worker_state_update_frequency = kong.configuration.worker_state_update_frequency or 1 + --[[ + +-----------+ + | Start | <-------------------------------------+ + +-----------+ | + | | + | | + v | + *************************** +-------+ | + * Is reconfigure running? * ---Yes--->| Sleep | ----+ + *************************** +-------+ + | ^ + No | + | | + v | + +---------------+ | + | rebuild router|-------------------------+ + +---------------+ + + Since reconfigure will also rebuild the router, we skip this round + of rebuilding the router. + --]] local router_async_opts = { - name = "router", + name = RECONFIGURE_OPTS and RECONFIGURE_OPTS.name or "router", -- please check the above diagram for the + -- reason of using the same name as reconfigure timeout = 0, on_timeout = "return_true", }