From 89c104510552a0b7bcefaac97828b83cea41844f Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Thu, 18 Jun 2020 19:23:41 +0700 Subject: [PATCH] log sent packets right before sending them out This means that the congestion stats logged will already include that packet. --- session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/session.go b/session.go index 6e7e35cef..c580dde77 100644 --- a/session.go +++ b/session.go @@ -1508,9 +1508,9 @@ func (s *session) sendPackedPacket(packet *packedPacket) { if s.firstAckElicitingPacketAfterIdleSentTime.IsZero() && packet.IsAckEliciting() { s.firstAckElicitingPacketAfterIdleSentTime = now } - s.logPacket(now, packet) s.sentPacketHandler.SentPacket(packet.ToAckHandlerPacket(time.Now(), s.retransmissionQueue)) s.connIDManager.SentPacket() + s.logPacket(now, packet) s.sendQueue.Send(packet.buffer) }