Merge pull request #2077 from lucas-clemente/speed-up-is-ack-eliciting

simplify (and speed up) IsFrameAckEliciting
This commit is contained in:
Marten Seemann
2019-08-23 23:00:28 +07:00
committed by GitHub

View File

@@ -4,12 +4,8 @@ import "github.com/lucas-clemente/quic-go/internal/wire"
// IsFrameAckEliciting returns true if the frame is ack-eliciting.
func IsFrameAckEliciting(f wire.Frame) bool {
switch f.(type) {
case *wire.AckFrame:
return false
default:
return true
}
_, ok := f.(*wire.AckFrame)
return !ok
}
// HasAckElicitingFrames returns true if at least one frame is ack-eliciting.