minimal send ack interval

This commit is contained in:
orignal 2021-12-05 17:54:34 -05:00
parent 5d924cd35a
commit 935e93eb36
2 changed files with 2 additions and 0 deletions

View file

@ -182,6 +182,7 @@ namespace stream
m_IsAckSendScheduled = true;
auto ackTimeout = m_RTT/10;
if (ackTimeout > m_AckDelay) ackTimeout = m_AckDelay;
else if (ackTimeout < MIN_SEND_ACK_TIMEOUT) ackTimeout = MIN_SEND_ACK_TIMEOUT;
m_AckSendTimer.expires_from_now (boost::posix_time::milliseconds(ackTimeout));
m_AckSendTimer.async_wait (std::bind (&Stream::HandleAckSendTimer,
shared_from_this (), std::placeholders::_1));