Explorar o código

[scheduledTasks] fixed RemoveTaskAfterExpiration not working (issue #34)

Exilon %!s(int64=5) %!d(string=hai) anos
pai
achega
20b39ff804
Modificáronse 1 ficheiros con 1 adicións e 6 borrados
  1. 1 6
      Quick.Threads.pas

+ 1 - 6
Quick.Threads.pas

@@ -2102,12 +2102,7 @@ begin
         end
         else
         begin
-          if task.IsEnabled then
-          begin
-            //if TScheduledTask(task).ExpireWithSync then Synchronize(ExpireTask)
-            //  else task.DoExpire;
-            if fRemoveTaskAfterExpiration then fTaskList.Remove(task);
-          end;
+          if (not task.IsEnabled) and (fRemoveTaskAfterExpiration) then fTaskList.Remove(task);
         end;
       end;
       task := nil;