Merge branch 'fix/close-db-file' into 'main'
Fix database file not being closed when leaving the world See merge request jeseibel/distant-horizons-core!31
This commit is contained in:
+4
-1
@@ -550,6 +550,9 @@ public class FullDataFileHandler implements IFullDataSourceProvider
|
||||
//=========//
|
||||
|
||||
@Override
|
||||
public void close() { FullDataMetaFile.checkAndLogPhantomDataSourceLifeCycles(); }
|
||||
public void close() {
|
||||
FullDataMetaFile.checkAndLogPhantomDataSourceLifeCycles();
|
||||
this.fullDataRepo.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
@@ -313,6 +313,7 @@ public class RenderSourceFileHandler implements IRenderSourceProvider
|
||||
LOGGER.info("Closing " + this.getClass().getSimpleName() + " with [" + this.loadedMetaFileBySectionPos.size() + "] files...");
|
||||
this.fileHandlerThreadPool.shutdown();
|
||||
this.threadPoolMsg.close();
|
||||
this.renderDataRepo.close();
|
||||
}
|
||||
|
||||
public void deleteRenderCache()
|
||||
|
||||
@@ -282,6 +282,7 @@ public abstract class AbstractDhRepo<TDTO extends IBaseDTO>
|
||||
{
|
||||
if(this.connection != null)
|
||||
{
|
||||
CONNECTIONS_BY_CONNECTION_STRING.remove(this.connectionString);
|
||||
this.connection.close();
|
||||
}
|
||||
ACTIVE_CONNECTION_STRINGS_BY_REPO.remove(this);
|
||||
|
||||
Reference in New Issue
Block a user