mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
check for closed connections
This commit is contained in:
parent
eb1c3263ec
commit
1cd30b84d5
@ -349,7 +349,7 @@ public class SQLManager implements AbstractDB {
|
||||
task = tasks.remove();
|
||||
count++;
|
||||
if (task != null) {
|
||||
if (task.method == null || !task.method.equals(method)) {
|
||||
if (task.method == null || !task.method.equals(method) || statement == null) {
|
||||
if (statement != null) {
|
||||
lastTask.execute(statement);
|
||||
statement.close();
|
||||
@ -359,6 +359,9 @@ public class SQLManager implements AbstractDB {
|
||||
}
|
||||
task.set(statement);
|
||||
task.addBatch(statement);
|
||||
if (statement.isClosed()) {
|
||||
statement = null;
|
||||
}
|
||||
}
|
||||
lastTask = task;
|
||||
} catch (Throwable e) {
|
||||
|
Loading…
Reference in New Issue
Block a user