mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-07 03:34:15 +00:00
don't check for LS expired for FF
This commit is contained in:
parent
331065eec6
commit
1bad097a13
@ -190,7 +190,7 @@ namespace data
|
|||||||
|
|
||||||
bool LeaseSet::IsExpired () const
|
bool LeaseSet::IsExpired () const
|
||||||
{
|
{
|
||||||
if (IsEmpty ()) return true;
|
if (m_StoreLeases && IsEmpty ()) return true;
|
||||||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||||
return ts > m_ExpirationTime;
|
return ts > m_ExpirationTime;
|
||||||
}
|
}
|
||||||
|
10
NetDb.cpp
10
NetDb.cpp
@ -462,7 +462,7 @@ namespace data
|
|||||||
bool updated = false;
|
bool updated = false;
|
||||||
if (buf[DATABASE_STORE_TYPE_OFFSET]) // type
|
if (buf[DATABASE_STORE_TYPE_OFFSET]) // type
|
||||||
{
|
{
|
||||||
LogPrint (eLogDebug, "NetDb: store request: LeaseSet");
|
LogPrint (eLogDebug, "NetDb: store request: LeaseSet for ", ident);
|
||||||
updated = AddLeaseSet (ident, buf + offset, len - offset, m->from);
|
updated = AddLeaseSet (ident, buf + offset, len - offset, m->from);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -688,14 +688,6 @@ namespace data
|
|||||||
LogPrint (eLogDebug, "NetDb: requested LeaseSet ", key, " found");
|
LogPrint (eLogDebug, "NetDb: requested LeaseSet ", key, " found");
|
||||||
replyMsg = CreateDatabaseStoreMsg (leaseSet);
|
replyMsg = CreateDatabaseStoreMsg (leaseSet);
|
||||||
}
|
}
|
||||||
else if (!leaseSet->IsEmpty())
|
|
||||||
{
|
|
||||||
LogPrint (eLogDebug, "NetDb: requested Expired LeaseSet ", key);
|
|
||||||
// remove LS as it is expired
|
|
||||||
m_LeaseSets.erase(ident);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
LogPrint(eLogWarning, "NetDb: LeaseSet is empty? ", ident.ToBase32());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!replyMsg)
|
if (!replyMsg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user