Fabriceli commented on code in PR #8928:
URL: https://github.com/apache/apisix/pull/8928#discussion_r1116534693


##########
apisix/discovery/consul/init.lua:
##########
@@ -246,7 +267,10 @@ function _M.connect(premature, consul_server, retry_delay)
                 -- add services to table
                 local nodes = up_services[service_name]
                 for  _, node in ipairs(result.body) do
-                    local svc_address, svc_port = node.ServiceAddress, 
node.ServicePort
+                    local svc_address, svc_port = nil, nil
+                    if node.Service then
+                        svc_address, svc_port = node.Service.Address, 
node.Service.Port
+                    end

Review Comment:
   if `node.Service` is nil, it need to CONTINUE, do not insert in the `nodes` 
table, the node is empty



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to