Browse Source

re-request remote LeaseSet

pull/167/head
orignal 10 years ago
parent
commit
4b47bfb5db
  1. 20
      Streaming.cpp

20
Streaming.cpp

@ -560,7 +560,7 @@ namespace stream @@ -560,7 +560,7 @@ namespace stream
UpdateCurrentRemoteLease ();
if (!m_RemoteLeaseSet)
{
LogPrint ("Can't send packets. Missing remote LeaseSet");
LogPrint (eLogError, "Can't send packets. Missing remote LeaseSet");
return;
}
}
@ -568,7 +568,7 @@ namespace stream @@ -568,7 +568,7 @@ namespace stream
m_CurrentOutboundTunnel = m_LocalDestination.GetOwner ().GetTunnelPool ()->GetNextOutboundTunnel ();
if (!m_CurrentOutboundTunnel)
{
LogPrint ("No outbound tunnels in the pool");
LogPrint (eLogError, "No outbound tunnels in the pool");
return;
}
@ -592,7 +592,19 @@ namespace stream @@ -592,7 +592,19 @@ namespace stream
m_CurrentOutboundTunnel->SendTunnelDataMsg (msgs);
}
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 ()
@ -642,7 +654,7 @@ namespace stream @@ -642,7 +654,7 @@ namespace stream
case 4:
UpdateCurrentRemoteLease (); // pick another lease
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;
case 3:
// pick another outbound tunnel

Loading…
Cancel
Save