9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0190-Paper-Fix-infinite-loop-in-RegionFile-IO.patch
2025-06-11 12:51:32 +09:00

28 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 9 Jun 2025 02:46:34 -0700
Subject: [PATCH] Paper: Fix infinite loop in RegionFile IO
Original license: GPLv3
Original project: https://github.com/PaperMC/Paper
https://github.com/PaperMC/Paper/commit/519e4224b1ba73a99c58c8fc53aab003eb6af37a
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.
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
index 60ed8cff397c964323fbda203ebfab3c7c9a873b..88207a3afd0260f572c7f54003d566c2c1cb1633 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) { // Paper - Fix infinite loop in RegionFile IO
// need to re-try from the start
this.scheduleReadIO();
return;