-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make sure that ACK frames are bundled with data #2543
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2543 +/- ##
==========================================
- Coverage 86.30% 86.28% -0.03%
==========================================
Files 122 122
Lines 9718 9744 +26
==========================================
+ Hits 8387 8407 +20
- Misses 990 996 +6
Partials 341 341
Continue to review full report at Codecov.
|
a323163
to
c6c0054
Compare
@@ -22,25 +22,26 @@ func newReceivedPacketHistory() *receivedPacketHistory { | |||
} | |||
|
|||
// ReceivedPacket registers a packet with PacketNumber p and updates the ranges | |||
func (h *receivedPacketHistory) ReceivedPacket(p protocol.PacketNumber) { | |||
func (h *receivedPacketHistory) ReceivedPacket(p protocol.PacketNumber) bool /* is a new packet (and not a duplicate / delayed packet) */ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe return an enum instead? Bools as return values can be hard to understand when the function name doesn't make it clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would that work? There are no enums in Go. Do you want to define a type alias for a bool?
type isNewType bool
const (
isNew isNewType = true
isNotNew isNewType = false
)
@@ -117,15 +117,15 @@ func (h *receivedPacketHandler) GetAckFrame(encLevel protocol.EncryptionLevel) * | |||
switch encLevel { | |||
case protocol.EncryptionInitial: | |||
if h.initialPackets != nil { | |||
ack = h.initialPackets.GetAckFrame() | |||
ack = h.initialPackets.GetAckFrame(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem, this is quite hard to read without context :)
c6c0054
to
b91874a
Compare
Fixes #2539.