2
0

Decrement progress of parenttask when childtask fails

This commit is contained in:
glax 2023-06-09 23:43:19 +02:00
parent 89c80d2997
commit b17800e0ef

View File

@ -127,6 +127,7 @@ public class TaskManager
DateTime.Now.Subtract(removeTask.Key.lastChange) > TimeSpan.FromMinutes(3))//3 Minutes since last update to task -> remove
{
logger?.WriteLine(this.GetType().ToString(), $"Disposing failed task {removeTask.Key}.");
removeTask.Key.parentTask?.DecrementProgress(removeTask.Key.progress);
removeTask.Value.Dispose();;
toRemove.Add(removeTask.Key);
}