From 48c5b600243c9fad2397666e549cb1f9973567b7 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sun, 8 Sep 2024 13:11:55 +0000 Subject: [PATCH] chore: grpc.DialContext has been deprecated --- .../grpchelper/authlistener_grpc_adaptor_wrapper.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rpc/grpcclientidentity/grpchelper/authlistener_grpc_adaptor_wrapper.go b/rpc/grpcclientidentity/grpchelper/authlistener_grpc_adaptor_wrapper.go index 91358d5..382ecc2 100644 --- a/rpc/grpcclientidentity/grpchelper/authlistener_grpc_adaptor_wrapper.go +++ b/rpc/grpcclientidentity/grpchelper/authlistener_grpc_adaptor_wrapper.go @@ -3,7 +3,6 @@ package grpchelper import ( - "context" "time" "google.golang.org/grpc" @@ -38,7 +37,7 @@ func ClientConn(cn transport.Connecter, log Logger) *grpc.ClientConn { cred := grpc.WithTransportCredentials(grpcclientidentity.NewTransportCredentials(log)) // we use context.Background without a timeout here because we don't set grpc.WithBlock // => docs: "In the non-blocking case, the ctx does not act against the connection. It only controls the setup steps." - cc, err := grpc.DialContext(context.Background(), "doesn't matter done by dialer", dialerOption, cred, ka) + cc, err := grpc.NewClient("passthrough://doesntmatterdonebydialer", dialerOption, cred, ka) if err != nil { log.WithError(err).Error("cannot create gRPC client conn (non-blocking)") // It's ok to panic here: the we call grpc.DialContext without the