From b255bdfb28b2a194b7ab07d3c834cfeaf8a1a6cf Mon Sep 17 00:00:00 2001 From: chronolaw Date: Sun, 3 Nov 2024 14:55:03 +0800 Subject: [PATCH] init.lua --- kong/init.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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