From a8e61cba8f5ea37919a249cc8aca6249e6459e09 Mon Sep 17 00:00:00 2001 From: chuzhongzai Date: Mon, 24 Mar 2025 22:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A3=80=E6=9F=A5=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E7=8A=B6=E6=80=81=E4=B9=8B=E5=90=8E=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E7=A7=BB=E9=99=A4=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/lion/storageNode.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/lion/storageNode.java b/src/main/java/lion/storageNode.java index f79c99c..f9fe35c 100644 --- a/src/main/java/lion/storageNode.java +++ b/src/main/java/lion/storageNode.java @@ -109,10 +109,7 @@ public class storageNode { downloadStatusMessage.setGalleryTasks(queue.values().toArray(GalleryTask[]::new)); server.writeAndFlush(downloadStatusMessage); - queue.forEach((gid, galleryTask) -> { - if (galleryTask.is_compress_complete()) - queue.remove(gid); - }); + queue.entrySet().removeIf(entry -> entry.getValue().is_compress_complete()); log.info("任务状态发送完成");