mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-06 21:57:36 +03:00
utils: switch to standard library min and max functions (#4218)
These functions were added in Go 1.21.
This commit is contained in:
parent
18c591c75a
commit
22411e16d5
24 changed files with 44 additions and 78 deletions
|
@ -294,7 +294,7 @@ func (p *TransportParameters) readNumericTransportParameter(
|
|||
return fmt.Errorf("initial_max_streams_uni too large: %d (maximum %d)", p.MaxUniStreamNum, protocol.MaxStreamCount)
|
||||
}
|
||||
case maxIdleTimeoutParameterID:
|
||||
p.MaxIdleTimeout = utils.Max(protocol.MinRemoteIdleTimeout, time.Duration(val)*time.Millisecond)
|
||||
p.MaxIdleTimeout = max(protocol.MinRemoteIdleTimeout, time.Duration(val)*time.Millisecond)
|
||||
case maxUDPPayloadSizeParameterID:
|
||||
if val < 1200 {
|
||||
return fmt.Errorf("invalid value for max_packet_size: %d (minimum 1200)", val)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue