move the RetransmissionThreshold to the server parameters

This commit is contained in:
Marten Seemann
2016-05-22 23:45:09 +07:00
parent 33de224ce0
commit f33058c504
3 changed files with 52 additions and 38 deletions

View File

@@ -26,10 +26,6 @@ var (
errWrongPacketNumberIncrement = errors.New("Packet number must be increased by exactly 1")
)
var (
retransmissionThreshold = uint8(3)
)
type sentPacketHandler struct {
lastSentPacketNumber protocol.PacketNumber
lastSentPacketEntropy EntropyAccumulator
@@ -97,7 +93,7 @@ func (h *sentPacketHandler) nackPacket(packetNumber protocol.PacketNumber) (*Pac
packet.MissingReports++
if packet.MissingReports > retransmissionThreshold {
if packet.MissingReports > protocol.RetransmissionThreshold {
h.queuePacketForRetransmission(packet)
return packet, nil
}