diff --git a/internal/grpc/services/gateway/appprovider.go b/internal/grpc/services/gateway/appprovider.go index be55590f75..af56ae88ea 100644 --- a/internal/grpc/services/gateway/appprovider.go +++ b/internal/grpc/services/gateway/appprovider.go @@ -325,12 +325,12 @@ func getGRPCConfig(opaque *typespb.Opaque) (bool, bool) { func getConn(host string, ins, skipverify bool) (*grpc.ClientConn, error) { if ins { - return grpc.Dial(host, grpc.WithTransportCredentials(insecure.NewCredentials())) + return grpc.NewClient(host, grpc.WithTransportCredentials(insecure.NewCredentials())) } // TODO(labkode): if in the future we want client-side certificate validation, // we need to load the client cert here tlsconf := &tls.Config{InsecureSkipVerify: skipverify} creds := credentials.NewTLS(tlsconf) - return grpc.Dial(host, grpc.WithTransportCredentials(creds)) + return grpc.NewClient(host, grpc.WithTransportCredentials(creds)) } diff --git a/pkg/sdk/session.go b/pkg/sdk/session.go index cfd0b5a8a0..a41c3fa47b 100644 --- a/pkg/sdk/session.go +++ b/pkg/sdk/session.go @@ -63,12 +63,12 @@ func (session *Session) Initiate(host string, insecure bool) error { func (session *Session) getConnection(host string, ins bool) (*grpc.ClientConn, error) { if ins { - return grpc.Dial(host, grpc.WithTransportCredentials(insecure.NewCredentials())) + return grpc.NewClient(host, grpc.WithTransportCredentials(insecure.NewCredentials())) } tlsconf := &tls.Config{InsecureSkipVerify: false} creds := credentials.NewTLS(tlsconf) - return grpc.Dial(host, grpc.WithTransportCredentials(creds)) + return grpc.NewClient(host, grpc.WithTransportCredentials(creds)) } // GetLoginMethods returns a list of all available login methods supported by the Reva instance.