2019-05-22 06:14:56 +02:00
|
|
|
From 699c040f962a1d2e090afe8d670b9c73e0a8ab5e Mon Sep 17 00:00:00 2001
|
2019-05-13 04:30:57 +02:00
|
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
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
|
2019-05-22 06:14:56 +02:00
|
|
|
index 844f491c70..1371834817 100644
|
2019-05-13 04:30:57 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
|
|
|
@@ -56,7 +56,7 @@ public abstract class RegionFileCache implements AutoCloseable {
|
|
|
|
return regionfile;
|
|
|
|
} else {
|
|
|
|
if (this.cache.size() >= PaperConfig.regionFileCacheSize) {
|
|
|
|
- this.cache.removeLast();
|
2019-05-13 06:06:28 +02:00
|
|
|
+ this.cache.removeLast().close(); // Paper - MC-151674
|
2019-05-13 04:30:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!this.a.exists()) {
|
|
|
|
--
|
|
|
|
2.21.0
|
|
|
|
|