aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/GlobalChannelFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-10-31 23:27:09 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2012-10-31 23:27:09 +1300
commite2a855c53cad32d38a53ed65c0b899f59c99e646 (patch)
tree7e20ce16641392d6d769232f224e7454e20b53eb /src/org/traccar/GlobalChannelFactory.java
parent68ef12c1844fd692aca86a848d268accadbe67be (diff)
downloadtrackermap-server-e2a855c53cad32d38a53ed65c0b899f59c99e646.tar.gz
trackermap-server-e2a855c53cad32d38a53ed65c0b899f59c99e646.tar.bz2
trackermap-server-e2a855c53cad32d38a53ed65c0b899f59c99e646.zip
Properly handle connection closing (fix #62)
Diffstat (limited to 'src/org/traccar/GlobalChannelFactory.java')
-rw-r--r--src/org/traccar/GlobalChannelFactory.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/GlobalChannelFactory.java b/src/org/traccar/GlobalChannelFactory.java
index 0c4d11275..a93703286 100644
--- a/src/org/traccar/GlobalChannelFactory.java
+++ b/src/org/traccar/GlobalChannelFactory.java
@@ -28,6 +28,13 @@ public class GlobalChannelFactory {
private GlobalChannelFactory() {
}
+
+ public static void release() {
+ if (instance != null) {
+ instance.releaseExternalResources();
+ }
+ instance = null;
+ }
public static ChannelFactory getFactory() {
if(instance == null) {