mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-06 21:57:36 +03:00
Always send retransmissions, irrespective of congestion state
This should probably only apply to RTOs, but we currently don't have a signal to distinguish them in the queue.
This commit is contained in:
parent
5321723ef1
commit
e44298a9cc
2 changed files with 13 additions and 1 deletions
|
@ -333,7 +333,11 @@ func (h *sentPacketHandler) SendingAllowed() bool {
|
|||
h.bytesInFlight,
|
||||
h.congestion.GetCongestionWindow())
|
||||
}
|
||||
return !(congestionLimited || maxTrackedLimited)
|
||||
// Workaround for #555:
|
||||
// Always allow sending of retransmissions. This should probably be limited
|
||||
// to RTOs, but we currently don't have a nice way of distinguishing them.
|
||||
haveRetransmissions := len(h.retransmissionQueue) > 0
|
||||
return !maxTrackedLimited && (!congestionLimited || haveRetransmissions)
|
||||
}
|
||||
|
||||
func (h *sentPacketHandler) retransmitOldestTwoPackets() {
|
||||
|
|
|
@ -678,6 +678,14 @@ var _ = Describe("SentPacketHandler", func() {
|
|||
handler.retransmissionQueue = make([]*Packet, protocol.MaxTrackedSentPackets)
|
||||
Expect(handler.SendingAllowed()).To(BeFalse())
|
||||
})
|
||||
|
||||
It("allows sending if there are retransmisisons outstanding", func() {
|
||||
err := handler.SentPacket(&Packet{PacketNumber: 1, Frames: []frames.Frame{}, Length: protocol.DefaultTCPMSS + 1})
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(handler.SendingAllowed()).To(BeFalse())
|
||||
handler.retransmissionQueue = []*Packet{nil}
|
||||
Expect(handler.SendingAllowed()).To(BeTrue())
|
||||
})
|
||||
})
|
||||
|
||||
Context("calculating RTO", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue