removed try-catch for checkSessionsTimeout because for actor all messages are processed sequentially
This commit is contained in:
parent
1507ac69ab
commit
3a00a792c3
@ -966,21 +966,14 @@ class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcessor {
|
||||
final long expTime = System.currentTimeMillis() - systemContext.getSessionInactivityTimeout();
|
||||
List<UUID> expiredIds = null;
|
||||
|
||||
try {
|
||||
for (Map.Entry<UUID, SessionInfoMetaData> kv : sessions.entrySet()) { //entry set are cached for stable sessions
|
||||
if (kv.getValue().getLastActivityTime() < expTime) {
|
||||
final UUID id = kv.getKey();
|
||||
if (expiredIds == null) {
|
||||
expiredIds = new ArrayList<>(1); //most of the expired sessions is a single event
|
||||
}
|
||||
expiredIds.add(id);
|
||||
|
||||
for (Map.Entry<UUID, SessionInfoMetaData> kv : sessions.entrySet()) { //entry set are cached for stable sessions
|
||||
if (kv.getValue().getLastActivityTime() < expTime) {
|
||||
final UUID id = kv.getKey();
|
||||
if (expiredIds == null) {
|
||||
expiredIds = new ArrayList<>(1); //most of the expired sessions is a single event
|
||||
}
|
||||
expiredIds.add(id);
|
||||
}
|
||||
} catch (ConcurrentModificationException ignored) {
|
||||
//Sessions are not thread safe and possible exceptions
|
||||
//It is an extremely rare event
|
||||
//Complete session check will perform on the next check
|
||||
}
|
||||
|
||||
if (expiredIds != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user