mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
handle LeaseSet expiration correctly
This commit is contained in:
parent
49b1e76585
commit
ca56d3fc23
3 changed files with 14 additions and 12 deletions
|
@ -731,8 +731,7 @@ namespace stream
|
|||
{
|
||||
if (!m_RemoteLeaseSet || m_RemoteLeaseSet->IsExpired ())
|
||||
{
|
||||
auto remoteLeaseSet = m_LocalDestination.GetOwner ()->FindLeaseSet (m_RemoteIdentity->GetIdentHash ());
|
||||
if (remoteLeaseSet) m_RemoteLeaseSet = remoteLeaseSet; // renew if possible
|
||||
m_RemoteLeaseSet = m_LocalDestination.GetOwner ()->FindLeaseSet (m_RemoteIdentity->GetIdentHash ());
|
||||
if (!m_RemoteLeaseSet)
|
||||
LogPrint (eLogWarning, "Streaming: LeaseSet ", m_RemoteIdentity->GetIdentHash ().ToBase64 (), " not found");
|
||||
}
|
||||
|
@ -774,6 +773,7 @@ namespace stream
|
|||
m_RemoteLeaseSet = nullptr;
|
||||
m_CurrentRemoteLease = nullptr;
|
||||
// re-request expired
|
||||
m_LocalDestination.GetOwner ()->RequestDestination (m_RemoteIdentity->GetIdentHash ());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue