assemble ackhandler.Frames, not wire.Frames, when packing a packet

This commit is contained in:
Marten Seemann
2019-08-29 13:36:37 +07:00
parent 93d5d15e3b
commit e622207822
10 changed files with 148 additions and 118 deletions

View File

@@ -9,9 +9,9 @@ func IsFrameAckEliciting(f wire.Frame) bool {
}
// HasAckElicitingFrames returns true if at least one frame is ack-eliciting.
func HasAckElicitingFrames(fs []wire.Frame) bool {
func HasAckElicitingFrames(fs []Frame) bool {
for _, f := range fs {
if IsFrameAckEliciting(f) {
if IsFrameAckEliciting(f.Frame) {
return true
}
}

View File

@@ -28,7 +28,7 @@ var _ = Describe("ack-eliciting frames", func() {
})
It("HasAckElicitingFrames works for "+fName, func() {
Expect(HasAckElicitingFrames([]wire.Frame{f})).To(Equal(e))
Expect(HasAckElicitingFrames([]Frame{{Frame: f}})).To(Equal(e))
})
}
})