mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-08 09:54:04 +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();
|
task = tasks.remove();
|
||||||
count++;
|
count++;
|
||||||
if (task != null) {
|
if (task != null) {
|
||||||
if (task.method == null || !task.method.equals(method)) {
|
if (task.method == null || !task.method.equals(method) || statement == null) {
|
||||||
if (statement != null) {
|
if (statement != null) {
|
||||||
lastTask.execute(statement);
|
lastTask.execute(statement);
|
||||||
statement.close();
|
statement.close();
|
||||||
@ -359,6 +359,9 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
task.set(statement);
|
task.set(statement);
|
||||||
task.addBatch(statement);
|
task.addBatch(statement);
|
||||||
|
if (statement.isClosed()) {
|
||||||
|
statement = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
lastTask = task;
|
lastTask = task;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user