cleanup previous tagsets

This commit is contained in:
orignal 2020-04-30 21:27:35 -04:00
parent 17e69e67b1
commit ec4e17f75c
3 changed files with 23 additions and 10 deletions

View file

@ -788,7 +788,7 @@ namespace garlic
// ECIESx25519
for (auto it = m_ECIESx25519Tags.begin (); it != m_ECIESx25519Tags.end ();)
{
if (ts > it->second.creationTime + ECIESX25519_INCOMING_TAGS_EXPIRATION_TIMEOUT)
if (it->second.tagset->IsExpired (ts) || ts > it->second.creationTime + ECIESX25519_INCOMING_TAGS_EXPIRATION_TIMEOUT)
it = m_ECIESx25519Tags.erase (it);
else
++it;