mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
move the Public Reset to the wire package
This commit is contained in:
parent
ed522ebbce
commit
524ecb5827
7 changed files with 39 additions and 36 deletions
|
@ -299,7 +299,7 @@ var _ = Describe("Server", func() {
|
|||
})
|
||||
|
||||
It("ignores public resets for unknown connections", func() {
|
||||
err := serv.handlePacket(nil, nil, writePublicReset(999, 1, 1337))
|
||||
err := serv.handlePacket(nil, nil, wire.WritePublicReset(999, 1, 1337))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(serv.sessions).To(BeEmpty())
|
||||
})
|
||||
|
@ -308,7 +308,7 @@ var _ = Describe("Server", func() {
|
|||
err := serv.handlePacket(nil, nil, firstPacket)
|
||||
Expect(serv.sessions).To(HaveLen(1))
|
||||
Expect(serv.sessions[connID].(*mockSession).packetCount).To(Equal(1))
|
||||
err = serv.handlePacket(nil, nil, writePublicReset(connID, 1, 1337))
|
||||
err = serv.handlePacket(nil, nil, wire.WritePublicReset(connID, 1, 1337))
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(serv.sessions).To(HaveLen(1))
|
||||
Expect(serv.sessions[connID].(*mockSession).packetCount).To(Equal(1))
|
||||
|
@ -318,7 +318,7 @@ var _ = Describe("Server", func() {
|
|||
err := serv.handlePacket(nil, nil, firstPacket)
|
||||
Expect(serv.sessions).To(HaveLen(1))
|
||||
Expect(serv.sessions[connID].(*mockSession).packetCount).To(Equal(1))
|
||||
data := writePublicReset(connID, 1, 1337)
|
||||
data := wire.WritePublicReset(connID, 1, 1337)
|
||||
err = serv.handlePacket(nil, nil, data[:len(data)-2])
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(serv.sessions).To(HaveLen(1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue