aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper/AdvancedConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/helper/AdvancedConnection.java')
-rw-r--r--src/org/traccar/helper/AdvancedConnection.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/helper/AdvancedConnection.java b/src/org/traccar/helper/AdvancedConnection.java
index 30be4dba8..c0126974b 100644
--- a/src/org/traccar/helper/AdvancedConnection.java
+++ b/src/org/traccar/helper/AdvancedConnection.java
@@ -40,6 +40,10 @@ public class AdvancedConnection {
}
public final void reset() throws SQLException {
+ if (connection != null) {
+ connection.close();
+ connection = null;
+ }
if (user != null && password != null) {
connection = DriverManager.getConnection(url, user, password);
} else {