Run benchmark server on localhost interface only.

This avoids triggering firewall warnings on OS X,
and it's generally safer too.
This commit is contained in:
David Symonds
2015-06-06 09:05:24 -07:00
parent 3c69282270
commit 73bb3c6426
3 changed files with 8 additions and 7 deletions

View File

@ -28,7 +28,7 @@ func main() {
grpclog.Fatalf("Failed to serve: %v", err)
}
}()
addr, stopper := benchmark.StartServer()
addr, stopper := benchmark.StartServer(":0") // listen on all interfaces
grpclog.Println("Server Address: ", addr)
<-time.After(time.Duration(*duration) * time.Second)
stopper()