Skip to content

Commit

Permalink
Working on bidirectional transmission use case
Browse files Browse the repository at this point in the history
  • Loading branch information
mbakholdina committed Apr 19, 2021
1 parent 1df524f commit eaaaec0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8087,8 +8087,13 @@ void CUDT::processCtrlAck(const CPacket &ctrlpkt, const steady_clock::time_point
// consistent with the previous behavior.
if (m_stats.recvTotal != 0)
{
m_iRTTVar = avg_iir<4>(m_iRTTVar, abs(rtt - m_iRTT));
m_iRTT = avg_iir<8>(m_iRTT, rtt);
// Ignore initial values which might arrive after smoothed RTT
// has been reset.
if (rtt != INITIAL_RTT && rttvar != INITIAL_RTTVAR)
{
m_iRTTVar = avg_iir<4>(m_iRTTVar, abs(rtt - m_iRTT));
m_iRTT = avg_iir<8>(m_iRTT, rtt);
}
}
// In the case of unidirectional transmission, extract the values of
// smoothed RTT and RTT variance from the ACK packet.
Expand Down

0 comments on commit eaaaec0

Please sign in to comment.