From a746449be86eaf2c4203670f365d92bf697efe20 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 9 Jun 2025 02:12:01 -0700 Subject: [PATCH] Fix infinite loop in RegionFile IO If an exception is thrown during decompress then the read process would be started again, which of course would eventually throw in the decompress process. --- .../moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java index 1acea58..25bceb8 100644 --- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java +++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java @@ -1143,7 +1143,7 @@ public final class MoonriseRegionFileIO { LOGGER.error("Failed to decompress chunk data for task: " + this.toString(), thr); } - if (compoundTag == null) { + if (throwable == null && compoundTag == null) { // need to re-try from the start this.scheduleReadIO(); return;