Browse Source

eliminate RTT self-reduction

pull/1825/head
orignal 2 years ago
parent
commit
6a743f66e8
  1. 2
      libi2pd/Streaming.cpp

2
libi2pd/Streaming.cpp

@ -435,7 +435,7 @@ namespace stream
LogPrint(eLogError, "Streaming: Packet ", seqn, "sent from the future, sendTime=", sentPacket->sendTime); LogPrint(eLogError, "Streaming: Packet ", seqn, "sent from the future, sendTime=", sentPacket->sendTime);
rtt = 1; rtt = 1;
} }
m_RTT = (m_RTT*seqn + rtt)/(seqn + 1); m_RTT = std::round ((m_RTT*seqn + rtt)/(seqn + 1.0));
m_RTO = m_RTT*1.5; // TODO: implement it better m_RTO = m_RTT*1.5; // TODO: implement it better
LogPrint (eLogDebug, "Streaming: Packet ", seqn, " acknowledged rtt=", rtt, " sentTime=", sentPacket->sendTime); LogPrint (eLogDebug, "Streaming: Packet ", seqn, " acknowledged rtt=", rtt, " sentTime=", sentPacket->sendTime);
m_SentPackets.erase (it++); m_SentPackets.erase (it++);

Loading…
Cancel
Save