mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
copy elimination for ranges #part3
This commit is contained in:
parent
8b53ded53a
commit
a530503c0c
9 changed files with 45 additions and 49 deletions
14
SSUData.cpp
14
SSUData.cpp
|
@ -427,12 +427,12 @@ namespace transport
|
|||
if (ts >= it->second->nextResendTime)
|
||||
{
|
||||
if (it->second->numResends < MAX_NUM_RESENDS)
|
||||
{
|
||||
{
|
||||
for (auto& f: it->second->fragments)
|
||||
if (f)
|
||||
if (f)
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
m_Session.Send (f->buf, f->len); // resend
|
||||
numResent++;
|
||||
}
|
||||
|
@ -440,11 +440,11 @@ namespace transport
|
|||
{
|
||||
LogPrint (eLogWarning, "SSU: Can't resend data fragment ", ec.what ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
it->second->numResends++;
|
||||
it->second->nextResendTime += it->second->numResends*RESEND_INTERVAL;
|
||||
it++;
|
||||
++it;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -453,7 +453,7 @@ namespace transport
|
|||
}
|
||||
}
|
||||
else
|
||||
it++;
|
||||
++it;
|
||||
}
|
||||
if (numResent < MAX_OUTGOING_WINDOW_SIZE)
|
||||
ScheduleResend ();
|
||||
|
@ -487,7 +487,7 @@ namespace transport
|
|||
it = m_IncompleteMessages.erase (it);
|
||||
}
|
||||
else
|
||||
it++;
|
||||
++it;
|
||||
}
|
||||
// decay
|
||||
if (m_ReceivedMessages.size () > MAX_NUM_RECEIVED_MESSAGES ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue