forked from quic-go/quic-go
simplify (and speed up) IsFrameAckEliciting
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user