Ableton Link issue

scenario :
reset link and tracktion transport to the initial measure after
playing.

tracktion transport sometimes doesn’t always start on correct measure,
beat is syncronized with link but tracktion transport jumps ahead.

Running original link hut from link examples, you can see that
link hut wait a countdown before starting to align to the starting measure,
while tracktion simply jumps ahead.

So for example you see that :

link hut is doing -3 -2 -1 0 | Measure 1
tracktion transport 0 1 2 3 | Measure 2

this depends from the (barLength - nextLinkCycle) in TransportControl::performPlay()

if (edit.getAbletonLink().isConnected())
{

    const double barLength = edit.tempoSequence.getTimeSig(0)->numerator;
    const double beatsUntilNextLinkCycle = edit.getAbletonLink().getBeatsUntilNextCycle (barLength);
			
    const double cyclePos = std::fmod (transportState->startTime.get().inSeconds(), barLength);
    const double nextLinkCycle = edit.tempoSequence.toTime (BeatPosition::fromBeats (beatsUntilNextLinkCycle)).inSeconds();

    transportState->startTime = TimePosition::fromSeconds ((transportState->startTime.get().inSeconds() - cyclePos) + (barLength - nextLinkCycle));

}