diff --git a/pkg/networkservice/common/connect/client.go b/pkg/networkservice/common/connect/client.go index 166a813b1..539eaf379 100644 --- a/pkg/networkservice/common/connect/client.go +++ b/pkg/networkservice/common/connect/client.go @@ -56,8 +56,10 @@ func (u *connectClient) init() error { ctx, cancel := context.WithTimeout(u.ctx, u.dialTimeout) defer cancel() + dialOptions := append(append([]grpc.DialOption{}, u.dialOptions...), grpc.WithReturnConnectionError()) + var cc *grpc.ClientConn - cc, u.dialErr = grpc.DialContext(ctx, grpcutils.URLToTarget(clientURL), append(u.dialOptions, grpc.WithReturnConnectionError())...) + cc, u.dialErr = grpc.DialContext(ctx, grpcutils.URLToTarget(clientURL), dialOptions...) if u.dialErr != nil { return }