forked from quic-go/quic-go
move the maximum ack delay exponennt to the protocol constants
This commit is contained in:
@@ -152,8 +152,8 @@ func (p *TransportParameters) readNumericTransportParameter(
|
||||
}
|
||||
p.MaxPacketSize = protocol.ByteCount(val)
|
||||
case ackDelayExponentParameterID:
|
||||
if val > 20 {
|
||||
return fmt.Errorf("invalid value for ack_delay_exponent: %d (maximum 20)", val)
|
||||
if val > protocol.MaxAckDelayExponent {
|
||||
return fmt.Errorf("invalid value for ack_delay_exponent: %d (maximum %d)", val, protocol.MaxAckDelayExponent)
|
||||
}
|
||||
p.AckDelayExponent = uint8(val)
|
||||
default:
|
||||
|
||||
@@ -66,3 +66,6 @@ const MinConnectionIDLenInitial = 8
|
||||
|
||||
// DefaultAckDelayExponent is the default ack delay exponent
|
||||
const DefaultAckDelayExponent = 3
|
||||
|
||||
// MaxAckDelayExponent is the maximum ack delay exponent
|
||||
const MaxAckDelayExponent = 20
|
||||
|
||||
Reference in New Issue
Block a user