aboutsummaryrefslogtreecommitdiff
path: root/src/net/dnsclient_unix.go
diff options
context:
space:
mode:
authorBenjamin Prosnitz <bprosnitz@google.com>2015-12-02 11:02:04 +0800
committerBrad Fitzpatrick <bradfitz@golang.org>2015-12-03 19:01:30 +0000
commit723605e9183314e977542fdca208f4ddeb5425f7 (patch)
tree108860ebe1ded122274095998feaf421d38c5bff /src/net/dnsclient_unix.go
parentd5e8f4dbb8b8c7ae4892ada9a3d1780f4f891c26 (diff)
downloadgo-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.go2
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
}
}