doen't send Ack packet too often if missing packets

This commit is contained in:
orignal 2024-01-27 17:57:50 -05:00
parent 530c353b00
commit a3246cd9dc

View File

@ -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);