mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
use ackhandler.Frame directly, not as a pointer, remove its sync.Pool (#3835)
This commit is contained in:
parent
f8d24ef1e9
commit
0438eada95
12 changed files with 74 additions and 103 deletions
|
@ -310,7 +310,7 @@ var _ = Describe("Connection", func() {
|
|||
err := conn.handleFrame(&wire.PathChallengeFrame{Data: data}, protocol.Encryption1RTT, protocol.ConnectionID{})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
frames, _ := conn.framer.AppendControlFrames(nil, 1000, protocol.Version1)
|
||||
Expect(frames).To(Equal([]*ackhandler.Frame{{Frame: &wire.PathResponseFrame{Data: data}}}))
|
||||
Expect(frames).To(Equal([]ackhandler.Frame{{Frame: &wire.PathResponseFrame{Data: data}}}))
|
||||
})
|
||||
|
||||
It("rejects NEW_TOKEN frames", func() {
|
||||
|
@ -1271,7 +1271,7 @@ var _ = Describe("Connection", func() {
|
|||
conn.scheduleSending()
|
||||
Eventually(sent).Should(BeClosed())
|
||||
frames, _ := conn.framer.AppendControlFrames(nil, 1000, protocol.Version1)
|
||||
Expect(frames).To(Equal([]*ackhandler.Frame{{Frame: &logging.DataBlockedFrame{MaximumData: 1337}}}))
|
||||
Expect(frames).To(Equal([]ackhandler.Frame{{Frame: &logging.DataBlockedFrame{MaximumData: 1337}}}))
|
||||
})
|
||||
|
||||
It("doesn't send when the SentPacketHandler doesn't allow it", func() {
|
||||
|
@ -1868,8 +1868,8 @@ var _ = Describe("Connection", func() {
|
|||
handshakeCtx := conn.HandshakeComplete()
|
||||
Consistently(handshakeCtx).ShouldNot(BeClosed())
|
||||
close(finishHandshake)
|
||||
var frames []*ackhandler.Frame
|
||||
Eventually(func() []*ackhandler.Frame {
|
||||
var frames []ackhandler.Frame
|
||||
Eventually(func() []ackhandler.Frame {
|
||||
frames, _ = conn.framer.AppendControlFrames(nil, protocol.MaxByteCount, protocol.Version1)
|
||||
return frames
|
||||
}).ShouldNot(BeEmpty())
|
||||
|
@ -1879,7 +1879,7 @@ var _ = Describe("Connection", func() {
|
|||
if cf, ok := f.Frame.(*wire.CryptoFrame); ok {
|
||||
count++
|
||||
s += len(cf.Data)
|
||||
Expect(f.Length(conn.version)).To(BeNumerically("<=", protocol.MaxPostHandshakeCryptoFrameSize))
|
||||
Expect(f.Frame.Length(conn.version)).To(BeNumerically("<=", protocol.MaxPostHandshakeCryptoFrameSize))
|
||||
}
|
||||
}
|
||||
Expect(size).To(BeEquivalentTo(s))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue