Browse Source

doen't send Ack packet too often if missing packets

pull/2011/head
orignal 11 months ago
parent
commit
a3246cd9dc
  1. 7
      libi2pd/Streaming.cpp

7
libi2pd/Streaming.cpp

@ -203,8 +203,11 @@ namespace stream @@ -203,8 +203,11 @@ namespace stream
// save message and wait for missing message again
SavePacket (packet);
if (m_LastReceivedSequenceNumber >= 0)
// send NACKs for missing messages with minimal timeout
ScheduleAck (MIN_SEND_ACK_TIMEOUT);
{
if (!m_IsAckSendScheduled)
// send NACKs for missing messages
ScheduleAck (MIN_SEND_ACK_TIMEOUT*m_SavedPackets.size ());
}
else
// wait for SYN
ScheduleAck (SYN_TIMEOUT);

Loading…
Cancel
Save