simplify (and speed up) IsFrameAckEliciting

This commit is contained in:
Marten Seemann
2019-08-20 13:12:30 +07:00
parent 2133d01956
commit e16bf92dc6

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.