Added localhost to net.Listen() calls to avoid macOS firewall dialog. (#1539)
This commit is contained in:
@ -31,7 +31,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
port = ":50051"
|
||||
port = "50051"
|
||||
)
|
||||
|
||||
// server is used to implement helloworld.GreeterServer.
|
||||
@ -43,7 +43,7 @@ func (s *server) SayHello(ctx context.Context, in *pb.HelloRequest) (*pb.HelloRe
|
||||
}
|
||||
|
||||
func main() {
|
||||
lis, err := net.Listen("tcp", port)
|
||||
lis, err := net.Listen("tcp", "localhost:"+port)
|
||||
if err != nil {
|
||||
log.Fatalf("failed to listen: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user