Fix infinite loop of DownloadNewChaptersTask

This commit is contained in:
2023-06-19 22:32:32 +02:00
parent a4c9168551
commit 6cdccdf66b
3 changed files with 29 additions and 30 deletions

View File

@ -69,7 +69,7 @@ public abstract class TrangaTask
this.executionStarted = DateTime.Now;
this.lastChange = DateTime.Now;
ExecuteTask(taskManager, logger, cancellationToken);
while(this.childTasks.Any(childTask => childTask.state is ExecutionState.Running or ExecutionState.Enqueued))
while(childTasks.Any(ct => ct.state is ExecutionState.Enqueued or ExecutionState.Running))
Thread.Sleep(1000);
this.lastExecuted = DateTime.Now;
this.state = ExecutionState.Waiting;