call OnCongestionEvent when packets are retransmitted due to an RTO

fixes #168
This commit is contained in:
Lucas Clemente
2016-06-06 11:56:32 +02:00
parent d5aced6e03
commit 4d5ff5d61e
2 changed files with 13 additions and 1 deletions

View File

@@ -311,8 +311,13 @@ func (h *sentPacketHandler) maybeQueuePacketsRTO() {
for p := h.highestInOrderAckedPacketNumber + 1; p <= h.lastSentPacketNumber; p++ {
packet := h.packetHistory[p]
if packet != nil && !packet.Retransmitted {
h.queuePacketForRetransmission(packet)
packetsLost := congestion.PacketVector{congestion.PacketInfo{
Number: packet.PacketNumber,
Length: packet.Length,
}}
h.congestion.OnCongestionEvent(false, h.BytesInFlight(), nil, packetsLost)
h.congestion.OnRetransmissionTimeout(true)
h.queuePacketForRetransmission(packet)
return
}
}