geforkt von Mirrors/FastAsyncWorldEdit
Fixed McRegionReader not being closed.
Dieser Commit ist enthalten in:
Ursprung
1d68fdd11c
Commit
49b4c190f9
@ -48,8 +48,15 @@ public abstract class McRegionChunkStore extends ChunkStore {
|
|||||||
|
|
||||||
protected McRegionReader getReader(Vector2D pos) throws DataException, IOException {
|
protected McRegionReader getReader(Vector2D pos) throws DataException, IOException {
|
||||||
String filename = getFilename(pos);
|
String filename = getFilename(pos);
|
||||||
if (curFilename != null && curFilename.equals(filename)) {
|
if (curFilename != null) {
|
||||||
|
if (curFilename.equals(filename)) {
|
||||||
return cachedReader;
|
return cachedReader;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
cachedReader.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
InputStream stream = getInputStream(filename);
|
InputStream stream = getInputStream(filename);
|
||||||
cachedReader = new McRegionReader(stream);
|
cachedReader = new McRegionReader(stream);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren