From 4cb3694cd5c133fd02de6d194ddd9cccc86c8419 Mon Sep 17 00:00:00 2001 From: glax Date: Tue, 27 Jun 2023 22:23:53 +0200 Subject: [PATCH] Re-add task timeout --- Tranga/TaskManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/TaskManager.cs b/Tranga/TaskManager.cs index aca744b..037f434 100644 --- a/Tranga/TaskManager.cs +++ b/Tranga/TaskManager.cs @@ -84,7 +84,7 @@ public class TaskManager } foreach (TrangaTask timedOutTask in _allTasks - .Where(taskQuery => taskQuery.lastChange.Add(TimeSpan.FromMinutes(3)) < DateTime.Now)) + .Where(taskQuery => taskQuery.lastChange < DateTime.Now.Subtract(TimeSpan.FromMinutes(3)))) { if(timedOutTask is DownloadChapterTask dct) _runningDownloadChapterTasks[dct].Cancel();