You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/03/30 01:55:46 UTC
[GitHub] [incubator-apisix] membphis commented on a change in pull request
#1361: check dns_addrs len
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:
users@infra.apache.org
With regards,
Apache Git Services