public long Reset(CancellationToken cancelToken)
{
var counter = _commandReset.Handle(new ResetHeartBeatCommand());
var total = counter;
while (counter > 0)
{
if (cancelToken.IsCancellationRequested)
return total;
counter = _commandReset.Handle(new ResetHeartBeatCommand());
total = total + counter;
}
return total;
}
}