mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 23:33:49 +01:00
Fix MC-151674 Close RegionFiles when they get evicted from cache
https://bugs.mojang.com/browse/MC-151674
This commit is contained in:
parent
6635ae643e
commit
ecafb51908
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
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()) {
|
||||
--
|
Loading…
Reference in a new issue