Browse Source

check for bogus times in packets

pull/628/head
Jeff Becker 8 years ago
parent
commit
50b9eca34c
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
  1. 5
      Streaming.cpp

5
Streaming.cpp

@ -269,6 +269,11 @@ namespace stream @@ -269,6 +269,11 @@ namespace stream
}
auto sentPacket = *it;
uint64_t rtt = ts - sentPacket->sendTime;
if(ts < sentPacket->sendTime)
{
LogPrint(eLogError, "Streaming: Packet ", seqn, "sent from the future, sendTime=", sentPacket->sendTime);
rtt = 0;
}
m_RTT = (m_RTT*seqn + rtt)/(seqn + 1);
m_RTO = m_RTT*1.5; // TODO: implement it better
LogPrint (eLogDebug, "Streaming: Packet ", seqn, " acknowledged rtt=", rtt);

Loading…
Cancel
Save