simplify frame queuing logic on 0-RTT rejection (#4607)

Even though we currently don't do so, sending MAX_DATA, MAX_STREAM_DATA
and MAX_STREAMS is allowed in 0-RTT.
This commit is contained in:
Marten Seemann
2024-08-03 17:00:41 -07:00
committed by GitHub
parent 86d5044eec
commit a147bee190
3 changed files with 11 additions and 15 deletions

View File

@@ -102,7 +102,7 @@ var _ = Describe("Framer", func() {
for _, f := range frames {
framer.QueueControlFrame(f)
}
Expect(framer.Handle0RTTRejection()).To(Succeed())
framer.Handle0RTTRejection()
fs, length := framer.AppendControlFrames(nil, protocol.MaxByteCount, protocol.Version1)
Expect(fs).To(HaveLen(2))
Expect(length).To(Equal(ping.Length(version) + ncid.Length(version)))
@@ -424,7 +424,7 @@ var _ = Describe("Framer", func() {
It("drops all STREAM frames when 0-RTT is rejected", func() {
framer.AddActiveStream(id1, stream1)
Expect(framer.Handle0RTTRejection()).To(Succeed())
framer.Handle0RTTRejection()
fs, length := framer.AppendStreamFrames(nil, protocol.MaxByteCount, protocol.Version1)
Expect(fs).To(BeEmpty())
Expect(length).To(BeZero())