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

Deal with RST_STREAM in HalfClosedLocal state #107

Merged

Conversation

edsko
Copy link
Collaborator

@edsko edsko commented Feb 3, 2024

See detailed justification in the code itself.

@kazu-yamamoto , just FYI, I'm getting closer to a first release of grapesy, my new gRPC library that has motivated all of my PRs against http2 and http2-tls. Its own test-suite is still not 100% happy, I don't yet know if that will yield further PRs, but grapesy now passes the full official gRPC interop test suite against both the Python reference and (after this PR fixing a RST_STREAM problem), also against the C++ reference. There are a few more references to check, I have to deal with my own test suite failures, and then I still have to do some stress testing to see if there are any memory leaks, but we are getting closer to a stable product.

See detailed justification in the code itself.
@kazu-yamamoto kazu-yamamoto self-requested a review February 5, 2024 00:41
-- > error code of NO_ERROR after sending a complete response (i.e., a frame
-- > with the END_STREAM flag).
-- > A stream in the "open" state may be used by both peers to send frames
-- > of any type. (..) From this state, either endpoint can send a frame
Copy link
Owner

Choose a reason for hiding this comment

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

What does (..) mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, (..) is just a standard way of indicating that some text was omitted. In this case, I only showed part of the spec that was relevant.

--
-- (emphasis not in original). This justifies the two non-error cases,
-- below. (Section 8.1 of the spec is also relevant, but it is less explicit
-- about the /either endpoint/ part.)
case (s, err) of
Copy link
Owner

Choose a reason for hiding this comment

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

In the case of _otherwise, closed is called to delete the stream from the stream table.
I'm not sure but I guessclosed should be called in any cases.
So, closed should be moved to the outside of case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense. I guess I introduced that bug as part of #78, apologies. I've pushed a fix, but let me run my full test suite first before merging.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, all tests pass ✔️

@kazu-yamamoto kazu-yamamoto self-requested a review February 6, 2024 23:29
Copy link
Owner

@kazu-yamamoto kazu-yamamoto left a comment

Choose a reason for hiding this comment

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

LGTM

@kazu-yamamoto kazu-yamamoto merged commit 4c1dfdd into kazu-yamamoto:main Feb 6, 2024
10 checks passed
@kazu-yamamoto
Copy link
Owner

Merged and released.
Thank you for your contribution!

@edsko
Copy link
Collaborator Author

edsko commented Feb 7, 2024

Thanks @kazu-yamamoto !

@edsko edsko deleted the edsko/rst-stream-in-half-closed-local branch February 7, 2024 08:03
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