Browse Source

use rtt for ack timeout

pull/380/head
orignal 9 years ago
parent
commit
49b1e76585
  1. 4
      Streaming.cpp

4
Streaming.cpp

@ -113,7 +113,9 @@ namespace stream @@ -113,7 +113,9 @@ namespace stream
if (!m_IsAckSendScheduled)
{
m_IsAckSendScheduled = true;
m_AckSendTimer.expires_from_now (boost::posix_time::milliseconds(m_RTT/10));
auto ackTimeout = m_RTT/10;
if (ackTimeout > ACK_SEND_TIMEOUT) ackTimeout = ACK_SEND_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));
}

Loading…
Cancel
Save