mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 04:37:36 +03:00
pass around the stateless reset token directly, not pointers to it
Benchmarks show that it's actually faster to make a copy of this 16 byte array than passing around a pointer to it.
This commit is contained in:
parent
1f676c2a6c
commit
0ef1b2f92e
7 changed files with 22 additions and 24 deletions
|
@ -247,7 +247,7 @@ var _ = Describe("Packet Handler Map", func() {
|
|||
var resetErr statelessResetErr
|
||||
Expect(errors.As(err, &resetErr)).To(BeTrue())
|
||||
Expect(err.Error()).To(ContainSubstring("received a stateless reset"))
|
||||
Expect(resetErr.token).To(Equal(&token))
|
||||
Expect(resetErr.token).To(Equal(token))
|
||||
close(destroyed)
|
||||
})
|
||||
conn.dataToRead <- packet
|
||||
|
@ -268,7 +268,7 @@ var _ = Describe("Packet Handler Map", func() {
|
|||
var resetErr statelessResetErr
|
||||
Expect(errors.As(err, &resetErr)).To(BeTrue())
|
||||
Expect(err.Error()).To(ContainSubstring("received a stateless reset"))
|
||||
Expect(resetErr.token).To(Equal(&token))
|
||||
Expect(resetErr.token).To(Equal(token))
|
||||
close(destroyed)
|
||||
})
|
||||
conn.dataToRead <- packet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue