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

return StreamErrors for all kinds of stream cancelations #3681

Merged
merged 2 commits into from
Jan 26, 2023

Conversation

marten-seemann
Copy link
Member

Apparently @Jorropo didn't allow me to push to his branch in #3674, so I'm recreating this PR.

@Jorropo Would you mind giving this PR a quick review?

@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2023

Codecov Report

Merging #3681 (69c7e52) into master (b52d340) will increase coverage by 1.57%.
The diff coverage is 55.56%.

@@            Coverage Diff             @@
##           master    #3681      +/-   ##
==========================================
+ Coverage   85.36%   86.93%   +1.57%     
==========================================
  Files         140      142       +2     
  Lines       10246    12085    +1839     
==========================================
+ Hits         8746    10505    +1759     
- Misses       1111     1156      +45     
- Partials      389      424      +35     
Impacted Files Coverage Δ
errors.go 33.33% <0.00%> (-33.33%) ⬇️
receive_stream.go 97.67% <100.00%> (+1.65%) ⬆️
send_stream.go 94.37% <100.00%> (+1.06%) ⬆️
stream.go 84.00% <0.00%> (-2.49%) ⬇️
config.go 100.00% <0.00%> (ø)
logging/packet_header.go 100.00% <0.00%> (ø)
internal/ackhandler/ackhandler.go 0.00% <0.00%> (ø)
internal/ackhandler/frame.go 44.44% <0.00%> (ø)
internal/qtls/go120.go 58.33% <0.00%> (ø)
internal/ackhandler/received_packet_history.go 96.51% <0.00%> (+0.08%) ⬆️
... and 29 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@Jorropo Jorropo left a comment

Choose a reason for hiding this comment

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

LGTM

s.cancelWriteErr = writeErr
s.cancelWriteErr = &StreamError{StreamID: s.streamID, ErrorCode: errorCode, Remote: remote}
Copy link
Contributor

@Jorropo Jorropo Jan 26, 2023

Choose a reason for hiding this comment

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

That a nice change, this tripped me up when doing the first commit because receive_stream also did the error in cancelWriteImpl and not CancelWrite

@marten-seemann marten-seemann merged commit 3f9d8fe into master Jan 26, 2023
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