mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
pkg/Makefile: allow DISABLE_NET_TESTS=1 to disable network tests
netchan, rpc, websocket: run test servers on 127.0.0.1, to avoid conflict with OS X firewall. TBR=r CC=golang-dev https://golang.org/cl/1689046
This commit is contained in:
parent
e495351ff7
commit
96d35c6984
4 changed files with 16 additions and 11 deletions
|
|
@ -55,7 +55,7 @@ func (t *Arith) Error(args *Args, reply *Reply) os.Error {
|
|||
func startServer() {
|
||||
Register(new(Arith))
|
||||
|
||||
l, e := net.Listen("tcp", ":0") // any available address
|
||||
l, e := net.Listen("tcp", "127.0.0.1:0") // any available address
|
||||
if e != nil {
|
||||
log.Exitf("net.Listen tcp :0: %v", e)
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ func startServer() {
|
|||
go Accept(l)
|
||||
|
||||
HandleHTTP()
|
||||
l, e = net.Listen("tcp", ":0") // any available address
|
||||
l, e = net.Listen("tcp", "127.0.0.1:0") // any available address
|
||||
if e != nil {
|
||||
log.Stderrf("net.Listen tcp :0: %v", e)
|
||||
os.Exit(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue