forked from quic-go/quic-go
implement generic Min and Max functions
This commit is contained in:
@@ -83,7 +83,7 @@ func (o *longHeaderOpener) Open(dst, src []byte, pn protocol.PacketNumber, ad []
|
||||
// It uses the nonce provided here and XOR it with the IV.
|
||||
dec, err := o.aead.Open(dst, o.nonceBuf, src, ad)
|
||||
if err == nil {
|
||||
o.highestRcvdPN = utils.MaxPacketNumber(o.highestRcvdPN, pn)
|
||||
o.highestRcvdPN = utils.Max(o.highestRcvdPN, pn)
|
||||
} else {
|
||||
err = ErrDecryptionFailed
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user