9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00

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.
This commit is contained in:
Taiyou06
2025-06-09 12:30:08 +02:00
parent 48c39c3570
commit 67c344231d

View File

@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Taiyou06 <kaandindar21@gmail.com>
Date: Mon, 9 Jun 2025 12:00:57 +0200
Subject: [PATCH] Paper: Fix infinite loop in RegionFile IO
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
index 60ed8cff397c964323fbda203ebfab3c7c9a873b..32ee1d3a0ae67738a65545e6a0046a12fb940fa4 100644
--- a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
+++ b/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;