From f9af96c8fa24db7ce721f1210275f4ba34f4ac22 Mon Sep 17 00:00:00 2001 From: Ritu Sood Date: Tue, 2 Jun 2020 10:31:33 -0700 Subject: Fix gRpc listen address listen function doesn't work with ip address. Binding on all interfaces Issue-ID: MULTICLOUD-1019 Signed-off-by: Ritu Sood Change-Id: I57e1082d8823b349660e0fb207e29ccc9c91a762 --- src/ovnaction/cmd/main.go | 4 ++-- src/rsync/cmd/main.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ovnaction/cmd/main.go b/src/ovnaction/cmd/main.go index 9e791cd1..a6b34923 100644 --- a/src/ovnaction/cmd/main.go +++ b/src/ovnaction/cmd/main.go @@ -50,9 +50,9 @@ func startGrpcServer() error { certFile := config.GetConfiguration().GrpcServerCert keyFile := config.GetConfiguration().GrpcServerKey - host, port := register.GetServerHostPort() + _, port := register.GetServerHostPort() - lis, err := net.Listen("tcp", fmt.Sprintf("%s:%d", host, port)) + lis, err := net.Listen("tcp", fmt.Sprintf(":%d", port)) if err != nil { log.Fatalf("Could not listen to port: %v", err) } diff --git a/src/rsync/cmd/main.go b/src/rsync/cmd/main.go index e62e0542..f46fa79b 100644 --- a/src/rsync/cmd/main.go +++ b/src/rsync/cmd/main.go @@ -43,9 +43,9 @@ func startGrpcServer() error { certFile := config.GetConfiguration().GrpcServerCert keyFile := config.GetConfiguration().GrpcServerKey - host, port := register.GetServerHostPort() + _, port := register.GetServerHostPort() - lis, err := net.Listen("tcp", fmt.Sprintf("%s:%d", host, port)) + lis, err := net.Listen("tcp", fmt.Sprintf(":%d", port)) if err != nil { log.Fatalf("Could not listen to port: %v", err) } -- cgit 1.2.3-korg