Skip to content

Commit

Permalink
limit send Ack timeout by Ack delay interval
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Jan 28, 2024
1 parent faaa811 commit 822cb35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libi2pd/Streaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,12 @@ namespace stream
if (m_LastReceivedSequenceNumber >= 0)
{
if (!m_IsAckSendScheduled)
{
// send NACKs for missing messages
ScheduleAck (MIN_SEND_ACK_TIMEOUT*m_SavedPackets.size ());
int ackTimeout = MIN_SEND_ACK_TIMEOUT*m_SavedPackets.size ();
if (ackTimeout > m_AckDelay) ackTimeout = m_AckDelay;
ScheduleAck (ackTimeout);
}
}
else
// wait for SYN
Expand Down

0 comments on commit 822cb35

Please sign in to comment.