From e3ec5420c00abbd0060e4a212f63a740aa39268b Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 20 May 2023 22:15:31 +0200 Subject: [PATCH] Fixed bug for enqueued tasks constantly being triggered to execute --- Tranga/TaskManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/TaskManager.cs b/Tranga/TaskManager.cs index c718985..9c7c411 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()); }