mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
remove invalid leasesets
This commit is contained in:
parent
e44ba54857
commit
884cf756ed
1 changed files with 2 additions and 2 deletions
|
@ -1220,9 +1220,9 @@ namespace data
|
||||||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||||
for (auto it = m_LeaseSets.begin (); it != m_LeaseSets.end ();)
|
for (auto it = m_LeaseSets.begin (); it != m_LeaseSets.end ();)
|
||||||
{
|
{
|
||||||
if (ts > it->second->GetExpirationTime () - LEASE_ENDDATE_THRESHOLD)
|
if (!it->second->IsValid () || ts > it->second->GetExpirationTime () - LEASE_ENDDATE_THRESHOLD)
|
||||||
{
|
{
|
||||||
LogPrint (eLogInfo, "NetDb: LeaseSet ", it->second->GetIdentHash ().ToBase64 (), " expired");
|
LogPrint (eLogInfo, "NetDb: LeaseSet ", it->second->GetIdentHash ().ToBase64 (), " expired or invalid");
|
||||||
it = m_LeaseSets.erase (it);
|
it = m_LeaseSets.erase (it);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue