From 8eb74004c6be557fad8db138f19762856d364a0b Mon Sep 17 00:00:00 2001 From: "Blue (Lukas Rieger)" Date: Mon, 13 Sep 2021 22:41:52 +0200 Subject: [PATCH] Fix running update task not being removed if a purge is scheduled --- .../bluecolored/bluemap/common/rendermanager/RenderManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderManager.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderManager.java index 26a26ac7..ea826bfb 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderManager.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderManager.java @@ -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); }