mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
set RTT on congestion control in ctor
This commit is contained in:
parent
8704f05812
commit
d937cf1cc7
1 changed files with 5 additions and 1 deletions
|
@ -37,8 +37,12 @@ Connection::Connection(Socket* parentSocket, HifiSockAddr destination, unique_pt
|
|||
|
||||
// setup default SYN, RTT and RTT Variance based on the SYN interval in CongestionControl object
|
||||
_synInterval = _congestionControl->synInterval();
|
||||
|
||||
_rtt = _synInterval * 10;
|
||||
_rttVariance = _rtt / 2;
|
||||
|
||||
// set the initial RTT on congestion control object
|
||||
_congestionControl->setRTT(_rtt);
|
||||
}
|
||||
|
||||
Connection::~Connection() {
|
||||
|
@ -375,7 +379,7 @@ void Connection::processACK(std::unique_ptr<ControlPacket> controlPacket) {
|
|||
|
||||
microseconds sinceLastACK2 = duration_cast<microseconds>(currentTime - lastACK2SendTime);
|
||||
|
||||
if (sinceLastACK2.count() > _synInterval || currentACKSubSequenceNumber == _lastSentACK2) {
|
||||
if (sinceLastACK2.count() >= _synInterval || currentACKSubSequenceNumber == _lastSentACK2) {
|
||||
// Send ACK2 packet
|
||||
sendACK2(currentACKSubSequenceNumber);
|
||||
|
||||
|
|
Loading…
Reference in a new issue