This is an automated email from the ASF dual-hosted git repository.

nic443 pushed a commit to branch feat/consul-registry-refactor
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/feat/consul-registry-refactor 
by this push:
     new 706ee02e8 refactor: simplify get_consul_services, remove unnecessary 
local
706ee02e8 is described below

commit 706ee02e890ae29bc8bf8cbe599f354e572ab262
Author: Nic <[email protected]>
AuthorDate: Fri Apr 17 14:14:12 2026 +0800

    refactor: simplify get_consul_services, remove unnecessary local
---
 apisix/discovery/consul/client.lua | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/apisix/discovery/consul/client.lua 
b/apisix/discovery/consul/client.lua
index 464e9d88c..a6690e4f4 100644
--- a/apisix/discovery/consul/client.lua
+++ b/apisix/discovery/consul/client.lua
@@ -453,9 +453,8 @@ local function iter_and_add_service(services, values)
             goto CONTINUE
         end
 
-        local svc_name = up.service_name
-        if not services[svc_name] then
-            services[svc_name] = true
+        if not services[up.service_name] then
+            services[up.service_name] = true
         end
         ::CONTINUE::
     end

Reply via email to