Fix gRpc listen address 02/108702/2
authorRitu Sood <ritu.sood@intel.com>
Tue, 2 Jun 2020 17:31:33 +0000 (10:31 -0700)
committerEric Multanen <eric.w.multanen@intel.com>
Wed, 10 Jun 2020 17:15:56 +0000 (10:15 -0700)
listen function doesn't work with ip address.
Binding on all interfaces

Issue-ID: MULTICLOUD-1019
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Change-Id: I57e1082d8823b349660e0fb207e29ccc9c91a762

src/ovnaction/cmd/main.go
src/rsync/cmd/main.go

index 9e791cd..a6b3492 100644 (file)
@@ -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)
        }
index e62e054..f46fa79 100644 (file)
@@ -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)
        }