ackhandler: don't log / trace skipped packets when declaring them lost (#3887)

This commit is contained in:
Marten Seemann 2023-06-04 22:29:40 +03:00 committed by GitHub
parent 8f3a68b4eb
commit 6619e17dd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -592,19 +592,23 @@ func (h *sentPacketHandler) detectLostPackets(now time.Time, encLevel protocol.E
var packetLost bool var packetLost bool
if p.SendTime.Before(lostSendTime) { if p.SendTime.Before(lostSendTime) {
packetLost = true packetLost = true
if h.logger.Debug() { if !p.skippedPacket {
h.logger.Debugf("\tlost packet %d (time threshold)", p.PacketNumber) if h.logger.Debug() {
} h.logger.Debugf("\tlost packet %d (time threshold)", p.PacketNumber)
if h.tracer != nil { }
h.tracer.LostPacket(p.EncryptionLevel, p.PacketNumber, logging.PacketLossTimeThreshold) if h.tracer != nil {
h.tracer.LostPacket(p.EncryptionLevel, p.PacketNumber, logging.PacketLossTimeThreshold)
}
} }
} else if pnSpace.largestAcked >= p.PacketNumber+packetThreshold { } else if pnSpace.largestAcked >= p.PacketNumber+packetThreshold {
packetLost = true packetLost = true
if h.logger.Debug() { if !p.skippedPacket {
h.logger.Debugf("\tlost packet %d (reordering threshold)", p.PacketNumber) if h.logger.Debug() {
} h.logger.Debugf("\tlost packet %d (reordering threshold)", p.PacketNumber)
if h.tracer != nil { }
h.tracer.LostPacket(p.EncryptionLevel, p.PacketNumber, logging.PacketLossReorderingThreshold) if h.tracer != nil {
h.tracer.LostPacket(p.EncryptionLevel, p.PacketNumber, logging.PacketLossReorderingThreshold)
}
} }
} else if pnSpace.lossTime.IsZero() { } else if pnSpace.lossTime.IsZero() {
// Note: This conditional is only entered once per call // Note: This conditional is only entered once per call