dht: expire announcement tokens after 30 minutes
dht::Database was exhibiting unbounded memory consumption due to generating and remembering announcement tokens without ever expiring and forgetting them. This commit augments the existing dht::Database::expire(bt::Timestamp) function so that it erases tokens that are more than MAX_ITEM_AGE (30 minutes) old. Also, it deletes and erases DBItemList instances when they have been emptied by expirations.
parent
a3f8f376
Please register or sign in to comment