fix: actually handle stopping the database when the bot is stopping
This commit is contained in:
@@ -50,4 +50,14 @@ public class DatabasePlugin {
|
||||
|
||||
return statement.executeUpdate(query);
|
||||
}
|
||||
|
||||
public void stop () {
|
||||
executorService.shutdown();
|
||||
|
||||
try {
|
||||
connection.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user