MapSessionRepository handles expried sessions

Fixes gh-31
This commit is contained in:
Rob Winch
2014-11-12 09:28:24 -06:00
parent 46173f6486
commit 04fcc393fd
2 changed files with 49 additions and 0 deletions

View File

@@ -62,6 +62,10 @@ public class MapSessionRepository implements SessionRepository<ExpiringSession>
if(saved == null) {
return null;
}
if(saved.isExpired()) {
delete(saved.getId());
return null;
}
MapSession result = new MapSession(saved);
result.setLastAccessedTime(System.currentTimeMillis());
return result;