Changes call transition from StopInitial to StopImmediate instead of terminate to ensure that all cancelation tokens are canceled and cleared

This commit is contained in:
Shannon
2019-10-24 14:35:30 +11:00
parent 52b0edf1f5
commit f513ed5476

View File

@@ -735,9 +735,9 @@ namespace Umbraco.Web.Scheduling
lock (_locker)
{
if (_runningTask != null)
_runningTask.ContinueWith(_ => Terminate(false));
_runningTask.ContinueWith(_ => StopImmediate());
else
Terminate(false);
StopImmediate();
}
}