Skip to content

Commit

Permalink
ATS-8
Browse files Browse the repository at this point in the history
no need to call this.collection.remove(mongoSession), since
session.expire() will trigger manager.remove()
  • Loading branch information
Matthias Müller committed Dec 10, 2018
1 parent de3700f commit 6c0c857
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/main/java/org/appng/tomcat/session/mongo/MongoStore.java
Expand Up @@ -252,10 +252,6 @@ public void processExpires() {
DBObject mongoSession = toExpire.next();
String id = (String) mongoSession.get(idProperty);
Long creationTime = (Long) mongoSession.get(creationTimeProperty);
Date lastModified = (Date) mongoSession.get(lastModifiedProperty);
long ageMinutes = TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis() - lastModified.getTime());
debug("Expiring session %s created at %s, last accessed at %s (age: %smin)", id, new Date(creationTime),
lastModified, ageMinutes);
Session session = manager.createEmptySession();
session.setId(id, false);
session.setManager(manager);
Expand All @@ -264,7 +260,6 @@ public void processExpires() {
session.endAccess();
// notify session listeners
session.expire();
this.collection.remove(mongoSession);
}
}
}
Expand Down

0 comments on commit 6c0c857

Please sign in to comment.