diff --git a/Lib/Neon.Common/Tasks/AsyncTimer.cs b/Lib/Neon.Common/Tasks/AsyncTimer.cs index 1aa40828..4f0b41f1 100644 --- a/Lib/Neon.Common/Tasks/AsyncTimer.cs +++ b/Lib/Neon.Common/Tasks/AsyncTimer.cs @@ -225,14 +225,14 @@ public void Start(TimeSpan interval = default, bool delayFirstTick = false, Func // We're restarting the timer so signal any existing timer task to // exit and set the new interval (if any). - if (IsRunning) + if (IsRunning && timerTask.Status == TaskStatus.Running) { Covenant.Assert(cts != null); cts.Cancel(); timerTask.WaitWithoutAggregate(); - cts = null; + cts = null; timerTask = null; }