]> Cypherpunks repositories - gostls13.git/commitdiff
http: do not listen on 0.0.0.0 during test
authorRuss Cox <rsc@golang.org>
Fri, 8 Apr 2011 17:04:29 +0000 (13:04 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 8 Apr 2011 17:04:29 +0000 (13:04 -0400)
Quiets the pop-up boxes on OS X.

R=bradfitzgo, r2
CC=golang-dev
https://golang.org/cl/4387042

src/pkg/http/serve_test.go

index cf889553fb7852f25d64efc9d7bcfa5fcbfb574d..1f91a2404361040ca4e26c23c1242464edfd4349 100644 (file)
@@ -231,7 +231,7 @@ func TestMuxRedirectLeadingSlashes(t *testing.T) {
 
 func TestServerTimeouts(t *testing.T) {
        // TODO(bradfitz): convert this to use httptest.Server
-       l, err := net.ListenTCP("tcp", &net.TCPAddr{Port: 0})
+       l, err := net.Listen("tcp", "127.0.0.1:0")
        if err != nil {
                t.Fatalf("listen error: %v", err)
        }