From 9b03f2b539bcc38b51bd9e954956b20821daa138 Mon Sep 17 00:00:00 2001 From: monkeyDluffy6017 Date: Fri, 8 Dec 2023 11:56:41 +0800 Subject: [PATCH] fix: minor tweaks --- apisix/core/config_etcd.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apisix/core/config_etcd.lua b/apisix/core/config_etcd.lua index a5b29f5914d4..f0c3cde1fe47 100644 --- a/apisix/core/config_etcd.lua +++ b/apisix/core/config_etcd.lua @@ -288,6 +288,9 @@ local function run_watch(premature) if not exiting() then ngx_timer_at(0, run_watch) + else + -- notify child watchers + produce_res(nil, "worker exited") end end @@ -843,6 +846,9 @@ local function _automatic_fetch(premature, self) .. backoff_duration .. "s") end end + elseif err == "worker exited" then + log.info("worker exited.") + return elseif err ~= "timeout" and err ~= "Key not found" and self.last_err ~= err then log.error("failed to fetch data from etcd: ", err, ", ",