use an array instead of a byte slice for Connection IDs

This commit is contained in:
Marten Seemann 2022-08-28 16:05:56 +03:00
parent 9e0f9e62ff
commit 1aced95d41
47 changed files with 530 additions and 487 deletions

View file

@ -372,7 +372,7 @@ var _ = Describe("0-RTT", func() {
It("retransmits all 0-RTT data when the server performs a Retry", func() {
var mutex sync.Mutex
var firstConnID, secondConnID protocol.ConnectionID
var firstConnID, secondConnID *protocol.ConnectionID
var firstCounter, secondCounter protocol.ByteCount
tlsConf, clientConf := dialAndReceiveSessionTicket(nil)
@ -415,13 +415,13 @@ var _ = Describe("0-RTT", func() {
if zeroRTTBytes := countZeroRTTBytes(data); zeroRTTBytes > 0 {
if firstConnID == nil {
firstConnID = connID
firstConnID = &connID
firstCounter += zeroRTTBytes
} else if firstConnID != nil && firstConnID.Equal(connID) {
Expect(secondConnID).To(BeNil())
firstCounter += zeroRTTBytes
} else if secondConnID == nil {
secondConnID = connID
secondConnID = &connID
secondCounter += zeroRTTBytes
} else if secondConnID != nil && secondConnID.Equal(connID) {
secondCounter += zeroRTTBytes