1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-30 21:07:48 +01:00

Closing existing database connection on plugin reload to properly

reconnect with new information if needed
This commit is contained in:
Zrips 2022-05-26 12:27:23 +03:00
parent a50af311d0
commit ab07c80b62

View File

@ -68,6 +68,13 @@ public class JobsManager {
private boolean certificate = false, ssl = false, autoReconnect = false;
public void start() {
if (Jobs.getJobsDAO() != null) {
Jobs.consoleMsg("&eClosing existing database connection...");
Jobs.getJobsDAO().closeConnections();
Jobs.consoleMsg("&eClosed");
}
ConfigReader c = Jobs.getGCManager().getConfig();
c.addComment("storage.method", "storage method, can be MySQL or sqlite");