bad fix to force reconnect?
This commit is contained in:
@@ -54,6 +54,9 @@ public class Database {
|
|||||||
public Connection getConnection() {
|
public Connection getConnection() {
|
||||||
try {
|
try {
|
||||||
instance.openConnection();
|
instance.openConnection();
|
||||||
|
if (!instance.connection.isValid(50)) {
|
||||||
|
instance.connection.prepareStatement("SHOW TABLES").executeQuery();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (SQLException e) {
|
catch (SQLException e) {
|
||||||
Logger.sql(e);
|
Logger.sql(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user