@@ -300,7 +300,7 @@ func start(ctx context.Context, config provider.Config) (*grpc.ClientConn, io.Re
300300 }
301301 if config .Address != "" {
302302 if config .CertPath == "" {
303- conn , err := grpc .Dial (fmt .Sprintf (config .Address ),
303+ conn , err := grpc .NewClient (fmt .Sprintf (config .Address ),
304304 grpc .WithDefaultCallOptions (grpc .MaxCallRecvMsgSize (socket .MAX_MESSAGE_SIZE )),
305305 grpc .WithTransportCredentials (insecure .NewCredentials ()))
306306 if err != nil {
@@ -313,7 +313,7 @@ func start(ctx context.Context, config provider.Config) (*grpc.ClientConn, io.Re
313313 return nil , nil , err
314314 }
315315 if config .JWTToken == "" {
316- conn , err := grpc .Dial (fmt .Sprintf (config .Address ),
316+ conn , err := grpc .NewClient (fmt .Sprintf (config .Address ),
317317 grpc .WithDefaultCallOptions (grpc .MaxCallRecvMsgSize (socket .MAX_MESSAGE_SIZE )),
318318 grpc .WithTransportCredentials (creds ))
319319 if err != nil {
@@ -325,7 +325,7 @@ func start(ctx context.Context, config provider.Config) (*grpc.ClientConn, io.Re
325325 i := & jwtTokeInterceptor {
326326 Token : config .JWTToken ,
327327 }
328- conn , err := grpc .Dial (fmt .Sprintf (config .Address ),
328+ conn , err := grpc .NewClient (fmt .Sprintf (config .Address ),
329329 grpc .WithDefaultCallOptions (grpc .MaxCallRecvMsgSize (socket .MAX_MESSAGE_SIZE )),
330330 grpc .WithTransportCredentials (creds ), grpc .WithUnaryInterceptor (i .unaryInterceptor ))
331331 if err != nil {
0 commit comments