forked from quic-go/quic-go
parse the packet header before getting the session from the session map
This commit is contained in:
@@ -422,7 +422,7 @@ var _ = Describe("Server", func() {
|
||||
Eventually(func() int { return conn.dataWritten.Len() }).ShouldNot(BeZero())
|
||||
Expect(conn.dataWrittenTo).To(Equal(udpAddr))
|
||||
r := bytes.NewReader(conn.dataWritten.Bytes())
|
||||
packet, err := wire.ParseHeader(r, protocol.PerspectiveServer, protocol.VersionUnknown)
|
||||
packet, err := wire.ParseHeaderSentByServer(r, protocol.VersionUnknown)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(packet.VersionFlag).To(BeTrue())
|
||||
Expect(packet.ConnectionID).To(Equal(protocol.ConnectionID(0x1337)))
|
||||
@@ -455,7 +455,7 @@ var _ = Describe("Server", func() {
|
||||
Eventually(func() int { return conn.dataWritten.Len() }).ShouldNot(BeZero())
|
||||
Expect(conn.dataWrittenTo).To(Equal(udpAddr))
|
||||
r := bytes.NewReader(conn.dataWritten.Bytes())
|
||||
packet, err := wire.ParseHeader(r, protocol.PerspectiveServer, protocol.VersionUnknown)
|
||||
packet, err := wire.ParseHeaderSentByServer(r, protocol.VersionUnknown)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(packet.Type).To(Equal(protocol.PacketTypeVersionNegotiation))
|
||||
Expect(packet.ConnectionID).To(Equal(protocol.ConnectionID(0x1337)))
|
||||
|
||||
Reference in New Issue
Block a user