mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-04 23:37:49 +01:00
Closing existing database connection on plugin reload to properly
reconnect with new information if needed
This commit is contained in:
parent
a50af311d0
commit
ab07c80b62
@ -68,6 +68,13 @@ public class JobsManager {
|
|||||||
private boolean certificate = false, ssl = false, autoReconnect = false;
|
private boolean certificate = false, ssl = false, autoReconnect = false;
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
|
|
||||||
|
if (Jobs.getJobsDAO() != null) {
|
||||||
|
Jobs.consoleMsg("&eClosing existing database connection...");
|
||||||
|
Jobs.getJobsDAO().closeConnections();
|
||||||
|
Jobs.consoleMsg("&eClosed");
|
||||||
|
}
|
||||||
|
|
||||||
ConfigReader c = Jobs.getGCManager().getConfig();
|
ConfigReader c = Jobs.getGCManager().getConfig();
|
||||||
|
|
||||||
c.addComment("storage.method", "storage method, can be MySQL or sqlite");
|
c.addComment("storage.method", "storage method, can be MySQL or sqlite");
|
||||||
|
Loading…
Reference in New Issue
Block a user