mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
drop expired leasesand renew leaseset
This commit is contained in:
parent
c754b5ae18
commit
e056c9c135
4 changed files with 33 additions and 19 deletions
|
@ -303,7 +303,7 @@ namespace client
|
|||
}
|
||||
else
|
||||
{
|
||||
LogPrint (eLogError, "New remote LeaseSet verification failed");
|
||||
LogPrint (eLogError, "New remote LeaseSet failed");
|
||||
leaseSet = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -678,7 +678,7 @@ namespace client
|
|||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||
for (auto it = m_RemoteLeaseSets.begin (); it != m_RemoteLeaseSets.end ();)
|
||||
{
|
||||
if (ts > it->second->GetExpirationTime ()) // leaseset expired
|
||||
if (it->second->IsEmpty () || ts > it->second->GetExpirationTime ()) // leaseset expired
|
||||
{
|
||||
LogPrint (eLogWarning, "Destination: Remote LeaseSet ", it->second->GetIdentHash ().ToBase64 (), " expired");
|
||||
it = m_RemoteLeaseSets.erase (it);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue