Skip to content

Commit

Permalink
ATS-34
Browse files Browse the repository at this point in the history
  • Loading branch information
madness-inc committed Feb 10, 2023
1 parent 80587eb commit a4e9f3f
Showing 1 changed file with 10 additions and 5 deletions.
Expand Up @@ -138,20 +138,25 @@ public void processExpires() {
}
AtomicInteger count = new AtomicInteger(0);
keys.forEach(id -> {
// must not use a lock here!
SessionData sessionData = getPersistentSessions().get(id);
String site = sessionData.getSite();
try {
// must not use a lock here!
SessionData sessionData = getPersistentSessions().get(id);
if (expireInternal(id, sessionData)) {
count.incrementAndGet();
log.debug(String.format("Expired session %s for site '%s'", id, site));
}
} catch (ObjectStreamException ose) {
log.info(String.format("{} occurred while checking session {} for expiration, so it will be removed: {}",
ose.getClass(), id, ose.getMessage()));
log.info(String.format(
"%s occurred while checking session %s of site '%s' for expiration, so it will be removed: %s",
ose.getClass(), id, site, ose.getMessage()));
sessions.remove(id);
removeInternal(id);
count.incrementAndGet();
} catch (Throwable t) {
log.error(String.format("Error expiring session %s", id), t);
log.error(
String.format("Error occurred while checking session %s of site '%s' for expiration", id, site),
t);
}
});
long timeEnd = System.currentTimeMillis();
Expand Down

0 comments on commit a4e9f3f

Please sign in to comment.