From 43d3eb2298cf1c49c09739d87a4ab6f6e3b02468 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 18 Mar 2020 15:21:51 +0700 Subject: [PATCH] only qlog the PTO count reset when the PTO count actually changed --- internal/ackhandler/sent_packet_handler.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/ackhandler/sent_packet_handler.go b/internal/ackhandler/sent_packet_handler.go index 6a7ba505d..d6014cddb 100644 --- a/internal/ackhandler/sent_packet_handler.go +++ b/internal/ackhandler/sent_packet_handler.go @@ -164,10 +164,10 @@ func (h *sentPacketHandler) dropPackets(encLevel protocol.EncryptionLevel) { panic(fmt.Sprintf("Cannot drop keys for encryption level %s", encLevel)) } h.setLossDetectionTimer() - h.ptoCount = 0 - if h.qlogger != nil { + if h.qlogger != nil && h.ptoCount != 0 { h.qlogger.UpdatedPTOCount(time.Now(), 0) } + h.ptoCount = 0 h.ptoMode = SendNone } @@ -293,10 +293,10 @@ func (h *sentPacketHandler) ReceivedAck(ack *wire.AckFrame, encLevel protocol.En return err } - h.ptoCount = 0 - if h.qlogger != nil { + if h.qlogger != nil && h.ptoCount != 0 { h.qlogger.UpdatedPTOCount(rcvTime, 0) } + h.ptoCount = 0 h.numProbesToSend = 0 h.setLossDetectionTimer()