Fix LetterEngine.checkConsistency.

Reference for cleanup should be the last time an entry was removed.
This commit is contained in:
asofold 2013-02-28 20:13:49 +01:00
parent f03ffcf0a5
commit 7c90d2260e

View File

@ -130,11 +130,11 @@ public class LetterEngine implements IRemoveData, IHaveCheckType, ConsistencyChe
public void checkConsistency(final Player[] onlinePlayers) {
// Use consistency checking to release some memory.
final long now = System.currentTimeMillis();
if (now < dataMap.lastAccess){
if (now < dataMap.lastExpired){
dataMap.clear();
return;
}
if (now - dataMap.lastAccess > dataMap.durExpire){
if (now - dataMap.lastExpired > dataMap.durExpire){
dataMap.expire(now - dataMap.durExpire);
}
}