Skip to content

Commit

Permalink
[core] SND pacing: amendment on probing packets
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Jan 26, 2022
1 parent 912463b commit ef11d26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9313,18 +9313,20 @@ std::pair<bool, steady_clock::time_point> srt::CUDT::packData(CPacket& w_packet)
m_stats.sndr.sentUnique.count(payload);
leaveCS(m_StatsLock);

const duration sendint = m_tdSendInterval;
if (probe)
{
// sends out probing packet pair
m_tsNextSendTime = enter_time;
// Sending earlier, need to adjust the pace later on.
m_tdSendTimeDiff = m_tdSendTimeDiff.load() - sendint;
probe = false;
}
else
{
#if USE_BUSY_WAITING
m_tsNextSendTime = enter_time + m_tdSendInterval.load();
#else
const duration sendint = m_tdSendInterval;
const duration sendbrw = m_tdSendTimeDiff;

if (sendbrw >= sendint)
Expand Down

0 comments on commit ef11d26

Please sign in to comment.