log sent packets right before sending them out

This means that the congestion stats logged will already include that packet.
This commit is contained in:
Marten Seemann
2020-06-18 19:23:41 +07:00
parent c956ca4447
commit 89c1045105

View File

@@ -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)
}