diff --git a/Tranga/TaskManager.cs b/Tranga/TaskManager.cs index c718985..9e53a46 100644 --- a/Tranga/TaskManager.cs +++ b/Tranga/TaskManager.cs @@ -66,7 +66,7 @@ public class TaskManager foreach (KeyValuePair> connectorTaskQueue in tasksToExecute) { connectorTaskQueue.Value.RemoveAll(task => task.state == TrangaTask.ExecutionState.Waiting); - if (connectorTaskQueue.Value.Count > 0 && !connectorTaskQueue.Value.All(task => task.state is TrangaTask.ExecutionState.Running or TrangaTask.ExecutionState.Waiting)) + if (connectorTaskQueue.Value.Count > 0 && !connectorTaskQueue.Value.All(task => task.state is TrangaTask.ExecutionState.Running or TrangaTask.ExecutionState.Enqueued)) ExecuteTaskNow(connectorTaskQueue.Value.First()); }