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

protect against concurrent use of Stream.Read #3380

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

marten-seemann
Copy link
Member

Concurrent use of Read is not permitted (and doesn't make any sense), but sometimes people do it anyway.

In this case, it's easy and cheap enough to protect against misuse of the API, and means we don't have to debug failures that look like quic-go bugs but are really bugs in the user's code. See #3376 for an example.

@codecov
Copy link

codecov bot commented Apr 15, 2022

Codecov Report

Merging #3380 (c34ebd1) into master (3324736) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3380   +/-   ##
=======================================
  Coverage   85.58%   85.58%           
=======================================
  Files         135      135           
  Lines        9872     9875    +3     
=======================================
+ Hits         8448     8451    +3     
  Misses       1047     1047           
  Partials      377      377           
Impacted Files Coverage Δ
receive_stream.go 96.03% <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 3324736...c34ebd1. Read the comment docs.

Copy link

@AnomalRoil AnomalRoil left a comment

Choose a reason for hiding this comment

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

Nice and easy solution, I like it.

@marten-seemann marten-seemann merged commit ec118e4 into master Apr 25, 2022
nmldiegues pushed a commit to chungthuang/quic-go that referenced this pull request Jun 6, 2022
@MarcoPolo MarcoPolo mentioned this pull request Jul 7, 2022
41 tasks
sudarshan-reddy pushed a commit to sudarshan-reddy/quic-go that referenced this pull request Aug 9, 2022
@ajnavarro ajnavarro mentioned this pull request Aug 24, 2022
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.

3 participants