Browse Source

limit send Ack timeout by Ack delay interval

pull/2013/head
orignal 11 months ago
parent
commit
822cb35efe
  1. 6
      libi2pd/Streaming.cpp

6
libi2pd/Streaming.cpp

@ -205,8 +205,12 @@ namespace stream
if (m_LastReceivedSequenceNumber >= 0) if (m_LastReceivedSequenceNumber >= 0)
{ {
if (!m_IsAckSendScheduled) if (!m_IsAckSendScheduled)
{
// send NACKs for missing messages // 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 else
// wait for SYN // wait for SYN

Loading…
Cancel
Save