forked from quic-go/quic-go
make it possible to get the PTO with and without max_ack_delay
This commit is contained in:
@@ -99,7 +99,7 @@ func (a *updatableAEAD) rollKeys(now time.Time) {
|
||||
a.numRcvdWithCurrentKey = 0
|
||||
a.numSentWithCurrentKey = 0
|
||||
a.prevRcvAEAD = a.rcvAEAD
|
||||
a.prevRcvAEADExpiry = now.Add(3 * a.rttStats.PTO())
|
||||
a.prevRcvAEADExpiry = now.Add(3 * a.rttStats.PTO(true))
|
||||
a.rcvAEAD = a.nextRcvAEAD
|
||||
a.sendAEAD = a.nextSendAEAD
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ var _ = Describe("Updatable AEAD", func() {
|
||||
It("drops keys 3 PTOs after a key update", func() {
|
||||
now := time.Now()
|
||||
rttStats.UpdateRTT(10*time.Millisecond, 0, now)
|
||||
pto := rttStats.PTO()
|
||||
pto := rttStats.PTO(true)
|
||||
encrypted01 := client.Seal(nil, msg, 0x42, ad)
|
||||
encrypted02 := client.Seal(nil, msg, 0x43, ad)
|
||||
// receive the first packet with key phase 0
|
||||
|
||||
Reference in New Issue
Block a user