Periodically purge expired elements from recently seelected quests repo

This commit is contained in:
Kenny Goodin 2017-05-30 20:36:39 -04:00
parent b7ba532568
commit b139d0550b
1 changed files with 3 additions and 0 deletions

View File

@ -151,6 +151,9 @@ public class QuestManager extends Thread
{
while (_alive)
{
// purge recently selected quests repo of expired entries
_recentlySelectedQuestsRepo.clean();
LocalDate now = LocalDate.now(EST_TIMEZONE);
// check if date has changed; if so we need to choose new quests
if (_currentDate.isBefore(now) || _activeQuests.isEmpty())