Commit 3492ee5d authored by Russ Cox's avatar Russ Cox

net/rpc: listen on localhost, let kernel pick port

This avoids a pop-up box on OS X and it avoids
a test failure if something is using 5555.
I apologize for not noticing this during the review.

TBR=r
CC=golang-codereviews
https://golang.org/cl/152320044
parent f3eece74
......@@ -63,13 +63,13 @@ func TestGobError(t *testing.T) {
}()
Register(new(S))
listen, err := net.Listen("tcp", ":5555")
listen, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
panic(err)
}
go Accept(listen)
client, err := Dial("tcp", ":5555")
client, err := Dial("tcp", listen.Addr().String())
if err != nil {
panic(err)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment