Skip to content
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

Merged
merged 6 commits into from
Jun 1, 2020
Merged

Conversation

marten-seemann
Copy link
Member

Fixes #2539.

@codecov-io
Copy link

codecov-io commented May 13, 2020

Codecov Report

Merging #2543 into master will decrease coverage by 0.03%.
The diff coverage is 82.09%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
packet_packer.go 83.83% <64.29%> (-1.13%) ⬇️
internal/ackhandler/received_packet_tracker.go 81.25% <84.62%> (+1.25%) ⬆️
framer.go 100.00% <100.00%> (ø)
internal/ackhandler/received_packet_handler.go 76.06% <100.00%> (ø)
internal/ackhandler/received_packet_history.go 97.37% <100.00%> (+0.04%) ⬆️
retransmission_queue.go 94.44% <100.00%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f54953f...b91874a. Read the comment docs.

@marten-seemann marten-seemann force-pushed the bundle-acks branch 2 times, most recently from a323163 to c6c0054 Compare May 14, 2020 04:53
@@ -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) */ {
Copy link
Member

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.

Copy link
Member Author

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)
Copy link
Member

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ACKs are not bundled any more
3 participants