Sometime I experience an issue where the end of a simulation hangs for a while and then produces a warning that it hits maximum iterations. If I simply run the TimeChoiceIterator to one less timestep than the tspan, this warning never happens:
for (u_, t) in OS.TimeChoiceIterator(integrator, tspan[1]:dtvis:(tspan[2] - dt₀))
...
end
I have not investigated this further at this time but just wanted to report it at this time in case somebody knows the solution immediately.