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

never send a value larger than 2^60 in MAX_STREAMS frames #2710

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

marten-seemann
Copy link
Member

@marten-seemann marten-seemann commented Aug 11, 2020

Fixes #2709.

@codecov
Copy link

codecov bot commented Aug 11, 2020

Codecov Report

Merging #2710 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2710   +/-   ##
=======================================
  Coverage   86.77%   86.77%           
=======================================
  Files         124      124           
  Lines        9893     9894    +1     
=======================================
+ Hits         8584     8585    +1     
  Misses        979      979           
  Partials      330      330           
Impacted Files Coverage Δ
streams_map_incoming_generic.go 92.63% <100.00%> (+0.08%) ⬆️

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 d7c2169...3c62c48. Read the comment docs.

})
maxStream := m.nextStreamToOpen + protocol.StreamNum(m.maxNumStreams-uint64(len(m.streams))) - 1
// Never send a value larger than protocol.MaxStreamCount.
if maxStream <= protocol.MaxStreamCount {
Copy link
Member

Choose a reason for hiding this comment

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

In the false case, should we send a capped maxStreamId frame, error, …? Silently ignoring this seems fragile?

Copy link
Member Author

Choose a reason for hiding this comment

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

There's no error here. It's just that we're running out of stream IDs (which are limit by the way they're encoded... to 2^60 per stream type).

@marten-seemann marten-seemann merged commit abb93ee into master Aug 17, 2020
@marten-seemann marten-seemann deleted the fix-max-streams-frame-overflow branch August 17, 2020 23:59
@aschmahmann aschmahmann mentioned this pull request Sep 22, 2020
72 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.

Confusing (incorrect?) behavior when both peers close a stream
2 participants