mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
don't overwrite whole lease
This commit is contained in:
parent
37e4dfc5d5
commit
b9552c42f1
|
@ -91,7 +91,7 @@ namespace data
|
||||||
if (m_StoreLeases)
|
if (m_StoreLeases)
|
||||||
{
|
{
|
||||||
auto ret = m_Leases.insert (std::make_shared<Lease>(lease));
|
auto ret = m_Leases.insert (std::make_shared<Lease>(lease));
|
||||||
if (!ret.second) *(*ret.first) = lease; // update existing
|
if (!ret.second) (*ret.first)->endDate = lease.endDate; // update existing
|
||||||
(*ret.first)->isUpdated = true;
|
(*ret.first)->isUpdated = true;
|
||||||
// check if lease's gateway is in our netDb
|
// check if lease's gateway is in our netDb
|
||||||
if (!netdb.FindRouter (lease.tunnelGateway))
|
if (!netdb.FindRouter (lease.tunnelGateway))
|
||||||
|
|
Loading…
Reference in a new issue