diff options
author | Benjamin Prosnitz <bprosnitz@google.com> | 2015-12-02 11:02:04 +0800 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2015-12-03 19:01:30 +0000 |
commit | 723605e9183314e977542fdca208f4ddeb5425f7 (patch) | |
tree | 108860ebe1ded122274095998feaf421d38c5bff /src/net/dnsclient_unix.go | |
parent | d5e8f4dbb8b8c7ae4892ada9a3d1780f4f891c26 (diff) | |
download | go-723605e9183314e977542fdca208f4ddeb5425f7.tar.gz go-723605e9183314e977542fdca208f4ddeb5425f7.zip |
net: fix failing TestGoLookupIPOrderFallbackToFile
Change-Id: I17ef4e221e5cd0fb8dc553785248ccac59380c6f
Reviewed-on: https://go-review.googlesource.com/17321
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/dnsclient_unix.go')
-rw-r--r-- | src/net/dnsclient_unix.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/dnsclient_unix.go b/src/net/dnsclient_unix.go index 5e963d27cc3..319011f5f6e 100644 --- a/src/net/dnsclient_unix.go +++ b/src/net/dnsclient_unix.go @@ -476,7 +476,7 @@ func goLookupIPOrder(name string, order hostLookupOrder) (addrs []IPAddr, err er if order == hostLookupDNSFiles { addrs = goLookupIPFiles(name) } - if lastErr != nil { + if len(addrs) == 0 && lastErr != nil { return nil, lastErr } } |