force duplicated sends to use highest RTT, not lowest

This commit is contained in:
Stephen Birarda 2016-10-13 18:29:08 -07:00
parent d15cb6171d
commit ef660722cd

View file

@ -71,7 +71,6 @@ bool TCPVegasCC::onACK(SequenceNumber ack, p_high_resolution_clock::time_point r
// remove this sent packet time from the hash
_sentPacketTimes.erase(it);
}
@ -224,6 +223,8 @@ void TCPVegasCC::performRenoCongestionAvoidance(SequenceNumber ack) {
}
void TCPVegasCC::onPacketSent(int packetSize, SequenceNumber seqNum, p_high_resolution_clock::time_point timePoint) {
_sentPacketTimes[seqNum] = { timePoint, packetSize };
if (_sentPacketTimes.find(seqNum) == _sentPacketTimes.end()) {
_sentPacketTimes[seqNum] = { timePoint, packetSize };
}
}