notify the congestion controller of losses first

This commit is contained in:
Marten Seemann 2020-04-01 13:41:55 +07:00
parent e2e3e10a63
commit 269f14d86c
2 changed files with 7 additions and 7 deletions

View file

@ -277,16 +277,16 @@ func (h *sentPacketHandler) ReceivedAck(ack *wire.AckFrame, encLevel protocol.En
return err
}
if err := h.detectAndRemoveLostPackets(rcvTime, encLevel, priorInFlight); err != nil {
return err
}
for _, p := range ackedPackets {
if p.includedInBytesInFlight {
h.congestion.OnPacketAcked(p.PacketNumber, p.Length, priorInFlight, rcvTime)
}
}
if err := h.detectAndRemoveLostPackets(rcvTime, encLevel, priorInFlight); err != nil {
return err
}
if h.qlogger != nil && h.ptoCount != 0 {
h.qlogger.UpdatedPTOCount(0)
}