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
}()
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)
}