diff --git a/pkg/services/tree/sync.go b/pkg/services/tree/sync.go index be22074a5..5bbc93978 100644 --- a/pkg/services/tree/sync.go +++ b/pkg/services/tree/sync.go @@ -294,7 +294,7 @@ func (s *Service) synchronizeTree(ctx context.Context, cid cid.ID, from uint64, return false } - cc, err := s.dialCtx(egCtx, a) + cc, err := s.createConnection(a) if err != nil { s.log.Warn(logs.TreeFailedToConnectForTreeSynchronization, zap.Error(err), zap.String("address", addr)) return false @@ -332,8 +332,8 @@ func (s *Service) synchronizeTree(ctx context.Context, cid cid.ID, from uint64, return from } -func (*Service) dialCtx(egCtx context.Context, a network.Address) (*grpc.ClientConn, error) { - return grpc.DialContext(egCtx, a.URIAddr(), +func (*Service) createConnection(a network.Address) (*grpc.ClientConn, error) { + return grpc.NewClient(a.URIAddr(), grpc.WithChainUnaryInterceptor( metrics.NewUnaryClientInterceptor(), tracing_grpc.NewUnaryClientInteceptor(),