mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
use a sync.Pool for ackhandler.Frames (#3656)
This commit is contained in:
parent
b77d8570df
commit
2aa71ff76b
13 changed files with 129 additions and 90 deletions
|
@ -64,7 +64,7 @@ var _ = Describe("Framer", func() {
|
|||
ping := &wire.PingFrame{}
|
||||
mdf := &wire.MaxDataFrame{MaximumData: 0x42}
|
||||
framer.QueueControlFrame(mdf)
|
||||
frames, length := framer.AppendControlFrames([]ackhandler.Frame{{Frame: ping}}, 1000)
|
||||
frames, length := framer.AppendControlFrames([]*ackhandler.Frame{{Frame: ping}}, 1000)
|
||||
Expect(frames).To(HaveLen(2))
|
||||
Expect(frames[0].Frame).To(Equal(ping))
|
||||
Expect(frames[1].Frame).To(Equal(mdf))
|
||||
|
@ -161,7 +161,7 @@ var _ = Describe("Framer", func() {
|
|||
stream1.EXPECT().popStreamFrame(gomock.Any()).Return(&ackhandler.Frame{Frame: f}, false)
|
||||
framer.AddActiveStream(id1)
|
||||
mdf := &wire.MaxDataFrame{MaximumData: 1337}
|
||||
frames := []ackhandler.Frame{{Frame: mdf}}
|
||||
frames := []*ackhandler.Frame{{Frame: mdf}}
|
||||
fs, length := framer.AppendStreamFrames(frames, 1000)
|
||||
Expect(fs).To(HaveLen(2))
|
||||
Expect(fs[0].Frame).To(Equal(mdf))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue