membphis commented on a change in pull request #1361: check dns_addrs len URL: https://github.com/apache/incubator-apisix/pull/1361#discussion_r399891051
########## File path: bin/apisix ########## @@ -702,7 +702,7 @@ local function init() local dns_resolver = sys_conf["dns_resolver"] if not dns_resolver or #dns_resolver == 0 then local dns_addrs, err = local_dns_resolver("/etc/resolv.conf") - if not dns_addrs then + if not dns_addrs and #dns_addrs == 0 then error("failed to import local DNS: " .. err) Review comment: the `err` may be a `nil` value if the length of `dns_addrs` is `0` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services