Fix database file not closed when leaving the world

This commit is contained in:
s809
2023-10-19 22:57:07 +05:00
parent 62bf59f098
commit 5f7e9c16f4
3 changed files with 6 additions and 1 deletions
@@ -550,6 +550,9 @@ public class FullDataFileHandler implements IFullDataSourceProvider
//=========//
@Override
public void close() { FullDataMetaFile.checkAndLogPhantomDataSourceLifeCycles(); }
public void close() {
FullDataMetaFile.checkAndLogPhantomDataSourceLifeCycles();
this.fullDataRepo.close();
}
}
@@ -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()
@@ -278,6 +278,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);