mirror of
https://github.com/golang/go
synced 2024-11-12 06:30:21 -07:00
net: don't leave hostsPath unrestored on error in TestLookupStaticHost
If the return was reached, then hostsPath would not be properly restored to its original value. See the (lengthy) discussion at https://golang.org/cl/15960047/ I assume that this is not for Go 1.2; mailing now since I promised to do so. I will plan to ping once Go 1.2 is out. R=rsc, bradfitz CC=golang-dev https://golang.org/cl/16200043
This commit is contained in:
parent
2f43ce7fb0
commit
cf51702bba
@ -41,7 +41,7 @@ func TestLookupStaticHost(t *testing.T) {
|
||||
if len(ips) != len(tt.ips) {
|
||||
t.Errorf("# of hosts = %v; want %v",
|
||||
len(ips), len(tt.ips))
|
||||
return
|
||||
continue
|
||||
}
|
||||
for k, v := range ips {
|
||||
if tt.ips[k].String() != v {
|
||||
|
Loading…
Reference in New Issue
Block a user