diff --git a/src/net/listen_test.go b/src/net/listen_test.go index c15b6bdc8f..96624f98ce 100644 --- a/src/net/listen_test.go +++ b/src/net/listen_test.go @@ -723,9 +723,9 @@ func TestClosingListener(t *testing.T) { ln.Close() - ln, err = Listen("tcp", addr.String()) + ln2, err := Listen("tcp", addr.String()) if err != nil { t.Fatal(err) } - ln.Close() + ln2.Close() }