From 2c27cc009056d22e3072e8ebf518092b471d3877 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 16 Apr 2019 11:32:01 +0900 Subject: [PATCH] rename the reordering threshold constant in the sent packet handler --- internal/ackhandler/sent_packet_handler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/ackhandler/sent_packet_handler.go b/internal/ackhandler/sent_packet_handler.go index 841087c8..8b04a4dc 100644 --- a/internal/ackhandler/sent_packet_handler.go +++ b/internal/ackhandler/sent_packet_handler.go @@ -15,8 +15,8 @@ import ( const ( // Maximum reordering in time space before time based loss detection considers a packet lost. - // In fraction of an RTT. - timeReorderingFraction = 1.0 / 8 + // Specified as an RTT multiplier. + timeThreshold = 9.0 / 8 // Timer granularity. The timer will not be set to a value smaller than granularity. granularity = time.Millisecond ) @@ -340,7 +340,7 @@ func (h *sentPacketHandler) detectLostPackets( pnSpace := h.getPacketNumberSpace(encLevel) maxRTT := float64(utils.MaxDuration(h.rttStats.LatestRTT(), h.rttStats.SmoothedRTT())) - lossDelay := time.Duration((1.0 + timeReorderingFraction) * maxRTT) + lossDelay := time.Duration(timeThreshold * maxRTT) var lostPackets []*Packet pnSpace.history.Iterate(func(packet *Packet) (bool, error) {