From aee18d55ec7ef48d7e56ae162cb4152ad53b01e0 Mon Sep 17 00:00:00 2001 From: dbeltukov Date: Fri, 24 May 2024 15:54:43 +0300 Subject: [PATCH] fix: get rid of using deprecated `grpc.DialContext` dabe62de7c7b06c70672ad8c8a37b018da611e9f --- plugin/client.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin/client.go b/plugin/client.go index f1ad4f1..1ce9ab0 100644 --- a/plugin/client.go +++ b/plugin/client.go @@ -77,13 +77,11 @@ func (c *Client) Sync(ctx context.Context, options plugin.SyncOptions, res chan< stateClient := state.Client(&state.NoOpClient{}) if options.BackendOptions != nil { - conn, err := grpc.DialContext(ctx, options.BackendOptions.Connection, - grpc.WithTransportCredentials(insecure.NewCredentials()), + conn, err := grpc.NewClient(options.BackendOptions.Connection, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultCallOptions( grpc.MaxCallRecvMsgSize(maxMsgSize), grpc.MaxCallSendMsgSize(maxMsgSize), - ), - ) + )) if err != nil { return fmt.Errorf("dial grpc source plugin at %s: %w", options.BackendOptions.Connection, err) }