mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
qlog stateless resets
This commit is contained in:
parent
cf45659c49
commit
a82d6bb910
9 changed files with 63 additions and 5 deletions
|
@ -233,7 +233,11 @@ var _ = Describe("Packet Handler Map", func() {
|
|||
packet := append([]byte{0x40} /* short header packet */, make([]byte, 50)...)
|
||||
packet = append(packet, token[:]...)
|
||||
destroyed := make(chan struct{})
|
||||
packetHandler.EXPECT().destroy(errors.New("received a stateless reset")).Do(func(error) {
|
||||
packetHandler.EXPECT().destroy(gomock.Any()).Do(func(err error) {
|
||||
Expect(err).To(HaveOccurred())
|
||||
Expect(err).To(BeAssignableToTypeOf(&statelessResetErr{}))
|
||||
Expect(err.Error()).To(ContainSubstring("received a stateless reset"))
|
||||
Expect(*err.(*statelessResetErr).StatelessResetToken()).To(Equal(token))
|
||||
close(destroyed)
|
||||
})
|
||||
conn.dataToRead <- packet
|
||||
|
@ -248,7 +252,11 @@ var _ = Describe("Packet Handler Map", func() {
|
|||
packet := append([]byte{0x40} /* short header packet */, make([]byte, 50)...)
|
||||
packet = append(packet, token[:]...)
|
||||
destroyed := make(chan struct{})
|
||||
packetHandler.EXPECT().destroy(errors.New("received a stateless reset")).Do(func(error) {
|
||||
packetHandler.EXPECT().destroy(gomock.Any()).Do(func(err error) {
|
||||
Expect(err).To(HaveOccurred())
|
||||
Expect(err).To(BeAssignableToTypeOf(&statelessResetErr{}))
|
||||
Expect(err.Error()).To(ContainSubstring("received a stateless reset"))
|
||||
Expect(*err.(*statelessResetErr).StatelessResetToken()).To(Equal(token))
|
||||
close(destroyed)
|
||||
})
|
||||
conn.dataToRead <- packet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue