aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 22:17:45 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-08 22:17:45 +1300
commit4a138cb8273e6a2078c0144ae592af81f563f71f (patch)
tree72f05ab0e127f7b4be4a09621d6fd63f90919e76 /src/org/traccar/web
parent3bf7acc65f2f54a7868a06cc14be39e08a68bf28 (diff)
downloadtrackermap-server-4a138cb8273e6a2078c0144ae592af81f563f71f.tar.gz
trackermap-server-4a138cb8273e6a2078c0144ae592af81f563f71f.tar.bz2
trackermap-server-4a138cb8273e6a2078c0144ae592af81f563f71f.zip
Fix refresh async session issue
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r--src/org/traccar/web/AsyncServlet.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/web/AsyncServlet.java b/src/org/traccar/web/AsyncServlet.java
index 73803ab91..a96a64381 100644
--- a/src/org/traccar/web/AsyncServlet.java
+++ b/src/org/traccar/web/AsyncServlet.java
@@ -50,7 +50,7 @@ public class AsyncServlet extends BaseServlet {
public static class AsyncSession {
- private static final boolean DEBUG_ASYNC = false;
+ private static final boolean DEBUG_ASYNC = true;
private static final long SESSION_TIMEOUT = 30;
private static final long REQUEST_TIMEOUT = 20;
@@ -114,7 +114,9 @@ public class AsyncServlet extends BaseServlet {
}
Context.getConnectionManager().removeListener(devices, dataListener);
synchronized (ASYNC_SESSIONS) {
- ASYNC_SESSIONS.remove(userId);
+ if (ASYNC_SESSIONS.get(userId) == AsyncSession.this) {
+ ASYNC_SESSIONS.remove(userId);
+ }
}
}
};