Skip to content

Commit

Permalink
don't drop routing path if no data received
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jan 10, 2025
1 parent 3e3e0e0 commit 915429b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libi2pd/Datagram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ namespace datagram
}

auto path = m_RoutingSession->GetSharedRoutingPath();
if (path && m_RoutingSession->IsRatchets () && (m_RoutingSession->CleanupUnconfirmedTags () ||
m_LastUse > m_RoutingSession->GetLastActivityTimestamp ()*1000 + DATAGRAM_SESSION_PATH_TIMEOUT))
if (path && m_RoutingSession->IsRatchets () && m_RoutingSession->CleanupUnconfirmedTags ())
{
LogPrint (eLogDebug, "Datagram: path reset");
m_RoutingSession->SetSharedRoutingPath (nullptr);
path = nullptr;
}
Expand Down
2 changes: 0 additions & 2 deletions libi2pd/Datagram.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ namespace datagram
{
// milliseconds for max session idle time
const uint64_t DATAGRAM_SESSION_MAX_IDLE = 10 * 60 * 1000;
// milliseconds for how long we try sticking to a dead routing path before trying to switch
const uint64_t DATAGRAM_SESSION_PATH_TIMEOUT = 10 * 1000;
// milliseconds interval a routing path is used before switching
const uint64_t DATAGRAM_SESSION_PATH_SWITCH_INTERVAL = 20 * 60 * 1000;
// milliseconds before lease expire should we try switching leases
Expand Down

0 comments on commit 915429b

Please sign in to comment.