mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
check if LeaseSet was submitted recently. Fixed typo
This commit is contained in:
parent
835c480269
commit
85be76b01a
4 changed files with 13 additions and 9 deletions
|
@ -950,10 +950,10 @@ namespace stream
|
|||
if (m_RoutingSession->IsLeaseSetNonConfirmed ())
|
||||
{
|
||||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||
if (ts > m_RoutingSession->GetLeaseSetSubmissionTime () + i2p::garlic::LEASET_CONFIRMATION_TIMEOUT)
|
||||
if (ts > m_RoutingSession->GetLeaseSetSubmissionTime () + i2p::garlic::LEASESET_CONFIRMATION_TIMEOUT)
|
||||
{
|
||||
// LeaseSet was not confirmed, should try other tunnels
|
||||
LogPrint (eLogWarning, "Streaming: LeaseSet was not confirmed in ", i2p::garlic::LEASET_CONFIRMATION_TIMEOUT, " milliseconds. Trying to resubmit");
|
||||
LogPrint (eLogWarning, "Streaming: LeaseSet was not confirmed in ", i2p::garlic::LEASESET_CONFIRMATION_TIMEOUT, " milliseconds. Trying to resubmit");
|
||||
m_RoutingSession->SetSharedRoutingPath (nullptr);
|
||||
m_CurrentOutboundTunnel = nullptr;
|
||||
m_CurrentRemoteLease = nullptr;
|
||||
|
@ -1074,9 +1074,13 @@ namespace stream
|
|||
{
|
||||
if (m_RoutingSession && m_RoutingSession->IsLeaseSetNonConfirmed ())
|
||||
{
|
||||
// seems something went wrong and we should re-select tunnels
|
||||
m_CurrentOutboundTunnel = nullptr;
|
||||
m_CurrentRemoteLease = nullptr;
|
||||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||
if (ts > m_RoutingSession->GetLeaseSetSubmissionTime () + i2p::garlic::LEASESET_CONFIRMATION_TIMEOUT)
|
||||
{
|
||||
// seems something went wrong and we should re-select tunnels
|
||||
m_CurrentOutboundTunnel = nullptr;
|
||||
m_CurrentRemoteLease = nullptr;
|
||||
}
|
||||
}
|
||||
SendQuickAck ();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue