mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-09 15:50:26 +03:00
faster RTT recalculation if bad sample
This commit is contained in:
parent
272bf7dbc1
commit
78ec5b2c6e
@ -197,6 +197,12 @@ namespace stream
|
||||
if (m_IsImmediateAckRequested)
|
||||
{
|
||||
auto ts = i2p::util::GetMillisecondsSinceEpoch ();
|
||||
if (m_IsFirstRttSample)
|
||||
{
|
||||
m_RTT = ts - m_LastSendTime;
|
||||
m_IsFirstRttSample = false;
|
||||
}
|
||||
else
|
||||
m_RTT = (m_RTT + (ts - m_LastSendTime)) / 2;
|
||||
m_IsImmediateAckRequested = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user