Skip to content

Commit

Permalink
[core] Fixed bonding packet timestamping
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Feb 8, 2021
1 parent 7656759 commit 2d14df2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions srtcore/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,8 @@ int CUDTGroup::sendBroadcast(const char* buf, int len, SRT_MSGCTRL& w_mc)
}

vector<Sendstate> sendstates;
if (w_mc.srctime == 0)
w_mc.srctime = count_microseconds(steady_clock::now().time_since_epoch());

for (vector<gli_t>::iterator snd = activeLinks.begin(); snd != activeLinks.end(); ++snd)
{
Expand Down Expand Up @@ -3960,6 +3962,8 @@ int CUDTGroup::sendBackup(const char* buf, int len, SRT_MSGCTRL& w_mc)

// Maximum weight of active links.
uint16_t maxActiveWeight = 0;
if (w_mc.srctime == 0)
w_mc.srctime = count_microseconds(steady_clock::now().time_since_epoch());

// We believe that we need to send the payload over every activeLinks link anyway.
for (vector<gli_t>::iterator snd = activeLinks.begin(); snd != activeLinks.end(); ++snd)
Expand Down

0 comments on commit 2d14df2

Please sign in to comment.