mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-14 01:10:45 +02:00
Fix #471 Task is already finished when task.Wait is called
Some checks failed
Docker Image CI / build (push) Has been cancelled
Some checks failed
Docker Image CI / build (push) Has been cancelled
This commit is contained in:
@@ -158,9 +158,12 @@ public static class Tranga
|
||||
{
|
||||
if (RunningWorkers.TryGetValue(worker, out Task<BaseWorker[]>? task))
|
||||
{
|
||||
Log.Debug($"Waiting for Children to exit {worker}");
|
||||
task.Wait();
|
||||
if (task.IsCompleted)
|
||||
if (!task.IsCompleted)
|
||||
{
|
||||
Log.Debug($"Waiting for Children to exit {worker}");
|
||||
task.Wait();
|
||||
}
|
||||
if (task.IsCompletedSuccessfully)
|
||||
{
|
||||
Log.Debug($"Children done {worker}");
|
||||
BaseWorker[] newWorkers = task.Result;
|
||||
|
Reference in New Issue
Block a user