diff --git a/pkg/connection/connection.go b/pkg/connection/connection.go index 46d1ff66..15c159f4 100644 --- a/pkg/connection/connection.go +++ b/pkg/connection/connection.go @@ -1,9 +1,7 @@ package connection import ( - "context" "fmt" - "net" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -11,13 +9,8 @@ import ( // New returns a grpc client connection for a given unix socket file path func New(addr string) (*grpc.ClientConn, error) { - dialer := func(ctx context.Context, addr string) (net.Conn, error) { - var d net.Dialer - return d.DialContext(ctx, "unix", addr) - } - - conn, err := grpc.Dial( - addr, grpc.WithContextDialer(dialer), + conn, err := grpc.NewClient( + "unix://"+addr, grpc.WithTransportCredentials(insecure.NewCredentials()), ) if err != nil {