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

refactor merge packet number ranges #3051

Merged

Conversation

q191201771
Copy link
Contributor

Since we iterate ranges from back to front, it is possible to merge two ranges only if extended at the beginning of a range.

  1. It's unnecessary to do a merge-check when extended at the end.
  2. // if the two ranges were not merge, we're done here, this comment is not matched with the original source code, we're done here because the range was extended(no matter merge or not).

@codecov
Copy link

codecov bot commented Feb 24, 2021

Codecov Report

Merging #3051 (de0a6d4) into master (e3c1a67) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3051      +/-   ##
==========================================
- Coverage   86.19%   86.19%   -0.00%     
==========================================
  Files         132      132              
  Lines        9350     9347       -3     
==========================================
- Hits         8059     8056       -3     
  Misses        935      935              
  Partials      356      356              
Impacted Files Coverage Δ
internal/ackhandler/received_packet_history.go 96.67% <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 e3c1a67...de0a6d4. Read the comment docs.

Copy link
Member

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!! I really like this, it makes the code much simpler!
Thank you for the contribution!

@marten-seemann marten-seemann merged commit 9b627ac into quic-go:master Feb 24, 2021
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 tasks
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.

2 participants