Fixed MySQL connections not being released when performing a reload
This commit is contained in:
parent
8ed4216c64
commit
947c59882e
3 changed files with 15 additions and 4 deletions
|
|
@ -175,6 +175,18 @@ public class Database extends Queue {
|
|||
return connection;
|
||||
}
|
||||
|
||||
public static void closeConnection() {
|
||||
try {
|
||||
if (ConfigHandler.hikariDataSource != null) {
|
||||
ConfigHandler.hikariDataSource.close();
|
||||
ConfigHandler.hikariDataSource = null;
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void performUpdate(Statement statement, long id, int action, int table) {
|
||||
try {
|
||||
int rolledBack = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue