Fix running update task not being removed if a purge is scheduled

This commit is contained in:
Blue (Lukas Rieger) 2021-09-13 22:41:52 +02:00
parent 4447c318bd
commit 8eb74004c6
No known key found for this signature in database
GPG Key ID: 904C4995F9E1F800

View File

@ -253,6 +253,7 @@ private void removeTasksThatAreContainedIn(RenderTask containingTask) {
synchronized (this.renderTasks) {
if (renderTasks.size() < 2) return;
RenderTask first = renderTasks.removeFirst();
if (containingTask.contains(first)) first.cancel();
renderTasks.removeIf(containingTask::contains);
renderTasks.addFirst(first);
}