tcp rtte: fix "attempt to multiply with overflow". Fixes #468

v0.7.x
Dario Nieuwenhuis 2021-05-28 21:02:10 +02:00
parent b693333125
commit cefbed6e52
1 changed files with 1 additions and 1 deletions

View File

@ -140,7 +140,7 @@ impl RttEstimator {
// all packets sent would incur a retransmit. To avoid this, force an estimate
// increase if we see 3 consecutive retransmissions without any successful sample.
self.rto_count = 0;
self.rtt *= 2;
self.rtt = RTTE_MAX_RTO.min(self.rtt*2);
let rto = self.retransmission_timeout().millis();
net_trace!("rtte: too many retransmissions, increasing: rtt={:?} dev={:?} rto={:?}", self.rtt, self.deviation, rto);
}