diff --git a/kong/init.lua b/kong/init.lua index 70e4555b37c0..17d094a693ac 100644 --- a/kong/init.lua +++ b/kong/init.lua @@ -994,12 +994,15 @@ function Kong.init_worker() end -- rpc and incremental sync - if kong.rpc and is_http_module then + if is_http_module then - -- rpc init connection - kong.rpc:init_worker() + -- init rpc connection + if kong.rpc then + kong.rpc:init_worker() + end -- init incremental sync + -- should run after rpc init successfully if kong.sync then kong.sync:init_worker() end