diff --git a/src/pkg/net/dnsclient_unix_test.go b/src/pkg/net/dnsclient_unix_test.go index 0375af59431..e8edc862da6 100644 --- a/src/pkg/net/dnsclient_unix_test.go +++ b/src/pkg/net/dnsclient_unix_test.go @@ -15,10 +15,10 @@ func TestTCPLookup(t *testing.T) { t.Skip("skipping test to avoid external network") } c, err := Dial("tcp", "8.8.8.8:53") - defer c.Close() if err != nil { t.Fatalf("Dial failed: %v", err) } + defer c.Close() cfg := &dnsConfig{timeout: 10, attempts: 3} _, err = exchange(cfg, c, "com.", dnsTypeALL) if err != nil {