mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
request encrypted LeaseSet if expired
This commit is contained in:
parent
5ad4c2a65e
commit
79dbf2a43e
@ -942,15 +942,21 @@ namespace stream
|
|||||||
{
|
{
|
||||||
if (!m_RemoteLeaseSet || m_RemoteLeaseSet->IsExpired ())
|
if (!m_RemoteLeaseSet || m_RemoteLeaseSet->IsExpired ())
|
||||||
{
|
{
|
||||||
m_RemoteLeaseSet = m_LocalDestination.GetOwner ()->FindLeaseSet (m_RemoteIdentity->GetIdentHash ());
|
auto remoteLeaseSet = m_LocalDestination.GetOwner ()->FindLeaseSet (m_RemoteIdentity->GetIdentHash ());
|
||||||
if (!m_RemoteLeaseSet)
|
if (!remoteLeaseSet)
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "Streaming: LeaseSet ", m_RemoteIdentity->GetIdentHash ().ToBase64 (), " not found");
|
LogPrint (eLogWarning, "Streaming: LeaseSet ", m_RemoteIdentity->GetIdentHash ().ToBase64 (), m_RemoteLeaseSet ? " expired" : " not found");
|
||||||
m_LocalDestination.GetOwner ()->RequestDestination (m_RemoteIdentity->GetIdentHash ()); // try to request for a next attempt
|
if (m_RemoteLeaseSet && m_RemoteLeaseSet->IsPublishedEncrypted ())
|
||||||
|
m_LocalDestination.GetOwner ()->RequestDestinationWithEncryptedLeaseSet (
|
||||||
|
std::make_shared<i2p::data::BlindedPublicKey>(m_RemoteIdentity));
|
||||||
|
else
|
||||||
|
m_LocalDestination.GetOwner ()->RequestDestination (m_RemoteIdentity->GetIdentHash ()); // try to request for a next attempt
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// LeaseSet updated
|
// LeaseSet updated
|
||||||
|
m_RemoteLeaseSet = remoteLeaseSet;
|
||||||
m_RemoteIdentity = m_RemoteLeaseSet->GetIdentity ();
|
m_RemoteIdentity = m_RemoteLeaseSet->GetIdentity ();
|
||||||
m_TransientVerifier = m_RemoteLeaseSet->GetTransientVerifier ();
|
m_TransientVerifier = m_RemoteLeaseSet->GetTransientVerifier ();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user