From ecafb51908fa6cf299328ad746a9d78a93a7f62e Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 12 May 2019 19:30:57 -0700 Subject: [PATCH] Fix MC-151674 Close RegionFiles when they get evicted from cache https://bugs.mojang.com/browse/MC-151674 --- ...ose-RegionFiles-when-they-get-evicte.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Spigot-Server-Patches/Fix-MC-151674-Close-RegionFiles-when-they-get-evicte.patch diff --git a/Spigot-Server-Patches/Fix-MC-151674-Close-RegionFiles-when-they-get-evicte.patch b/Spigot-Server-Patches/Fix-MC-151674-Close-RegionFiles-when-they-get-evicte.patch new file mode 100644 index 0000000000..52d17c6c33 --- /dev/null +++ b/Spigot-Server-Patches/Fix-MC-151674-Close-RegionFiles-when-they-get-evicte.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Spottedleaf +Date: Sun, 12 May 2019 19:25:53 -0700 +Subject: [PATCH] Fix MC-151674 Close RegionFiles when they get evicted from + cache + +https://bugs.mojang.com/browse/MC-151674 + +diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java +index d39d49944..5a22b661b 100644 +--- a/src/main/java/net/minecraft/server/RegionFileCache.java ++++ b/src/main/java/net/minecraft/server/RegionFileCache.java +@@ -0,0 +0,0 @@ public abstract class RegionFileCache implements AutoCloseable { + return regionfile; + } else { + if (this.cache.size() >= PaperConfig.regionFileCacheSize) { +- this.cache.removeLast(); ++ this.cache.removeLast().close(); + } + + if (!this.a.exists()) { +-- \ No newline at end of file