skip resent recently sessions during resend

This commit is contained in:
orignal 2024-05-14 18:17:47 -04:00
parent f5b823a712
commit 124698854f
3 changed files with 8 additions and 3 deletions

View file

@ -987,7 +987,8 @@ namespace transport
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
for (auto it: m_Sessions)
{
resentPacketsNum += it.second->Resend (ts);
if (ts >= it.second->GetLastResendTime () + SSU2_RESEND_CHECK_TIMEOUT)
resentPacketsNum += it.second->Resend (ts);
if (resentPacketsNum > SSU2_MAX_RESEND_PACKETS) break;
}
for (auto it: m_PendingOutgoingSessions)