mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
re-request remote LeaseSet
This commit is contained in:
parent
18deb8b4f2
commit
4b47bfb5db
1 changed files with 21 additions and 9 deletions
|
@ -560,7 +560,7 @@ namespace stream
|
||||||
UpdateCurrentRemoteLease ();
|
UpdateCurrentRemoteLease ();
|
||||||
if (!m_RemoteLeaseSet)
|
if (!m_RemoteLeaseSet)
|
||||||
{
|
{
|
||||||
LogPrint ("Can't send packets. Missing remote LeaseSet");
|
LogPrint (eLogError, "Can't send packets. Missing remote LeaseSet");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -568,7 +568,7 @@ namespace stream
|
||||||
m_CurrentOutboundTunnel = m_LocalDestination.GetOwner ().GetTunnelPool ()->GetNextOutboundTunnel ();
|
m_CurrentOutboundTunnel = m_LocalDestination.GetOwner ().GetTunnelPool ()->GetNextOutboundTunnel ();
|
||||||
if (!m_CurrentOutboundTunnel)
|
if (!m_CurrentOutboundTunnel)
|
||||||
{
|
{
|
||||||
LogPrint ("No outbound tunnels in the pool");
|
LogPrint (eLogError, "No outbound tunnels in the pool");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -592,7 +592,19 @@ namespace stream
|
||||||
m_CurrentOutboundTunnel->SendTunnelDataMsg (msgs);
|
m_CurrentOutboundTunnel->SendTunnelDataMsg (msgs);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LogPrint ("All leases are expired");
|
{
|
||||||
|
LogPrint (eLogInfo, "All leases are expired. Trying to request");
|
||||||
|
m_RemoteLeaseSet = nullptr;
|
||||||
|
m_LocalDestination.GetOwner ().RequestDestination (m_RemoteIdentity.GetIdentHash (),
|
||||||
|
[packets, this](bool success)
|
||||||
|
{
|
||||||
|
if (success)
|
||||||
|
{
|
||||||
|
LogPrint (eLogInfo, "New LeaseSet found. Sending packets");
|
||||||
|
SendPackets (packets);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stream::ScheduleResend ()
|
void Stream::ScheduleResend ()
|
||||||
|
@ -642,7 +654,7 @@ namespace stream
|
||||||
case 4:
|
case 4:
|
||||||
UpdateCurrentRemoteLease (); // pick another lease
|
UpdateCurrentRemoteLease (); // pick another lease
|
||||||
m_RTO = INITIAL_RTO; // drop RTO to initial upon tunnels pair change
|
m_RTO = INITIAL_RTO; // drop RTO to initial upon tunnels pair change
|
||||||
LogPrint (eLogWarning, "Another remote lease has been selected stream");
|
LogPrint (eLogWarning, "Another remote lease has been selected for stream");
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// pick another outbound tunnel
|
// pick another outbound tunnel
|
||||||
|
|
Loading…
Add table
Reference in a new issue