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

Use GOAWAY reason NO_ERROR in client-initiated graceful shutdown #312

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zuiderkwast
Copy link
Contributor

Fixes #311.

Do you want me to verify the goaway reason in a test case? If yes, do you prefer to put it in rfc7540_SUITE or in shutdown_SUITE?

@essen
Copy link
Member

essen commented Sep 21, 2023

Yes in rfc7540 referencing the text in section 6.8.

@essen
Copy link
Member

essen commented Sep 25, 2023

Please ping when all your PRs are good for review so I can do everything in one pass.

@zuiderkwast
Copy link
Contributor Author

zuiderkwast commented Sep 25, 2023

Sure, ping @essen. This one is good for review now, as are the other ones.

I struggled to find a good quote for a client's graceful shutdown. There isn't an obvious sentence to quote like there is for a server: "A server that is attempting to gracefully shut down a connection SHOULD send an initial GOAWAY frame (...)".

I picked this one: "(...) an endpoint that sends GOAWAY with NO_ERROR during graceful shutdown (...)" RFC7540 6.8

Another option is from section 7, the list of error codes: "NO_ERROR (0x0): The associated condition is not a result of an error. For example, a GOAWAY might include this code to indicate graceful shutdown of a connection." (RFC7540 7) I added this one in a comment.

@essen
Copy link
Member

essen commented Oct 2, 2023

The "doc" string is not actually a quote but a rule inferred by sections of the RFC, and sometimes by the implementation choices (such as SHOULD becoming MUST). But don't worry I can update that when merging. I'll wait to do a single merge pass of all the PRs.

@zuiderkwast
Copy link
Contributor Author

Great. All good then? I went over the other PRs you commented on today. Tell me if there is anything more.

bjosv pushed a commit to Nordix/gun that referenced this pull request Apr 2, 2024
Add GOAWAY NO_ERROR testcase in rfc7540_SUITE

Merged PR:
ninenines#312
%% NO_ERROR (0x0): The associated condition is not a result of an error.
%% For example, a GOAWAY might include this code to indicate graceful
%% shutdown of a connection. (RFC7540 7)
{ok, _, Port} = init_origin(tcp, http2, fun(Parent, Socket, _Transport) ->
Copy link
Contributor

Choose a reason for hiding this comment

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

The fun takes (Parent, ListenSocket, ClientSocket, ClientTransport)

Suggested change
{ok, _, Port} = init_origin(tcp, http2, fun(Parent, Socket, _Transport) ->
{ok, _, Port} = init_origin(tcp, http2, fun(Parent, _ListenSocket, Socket, _Transport) ->

bjosv pushed a commit to Nordix/gun that referenced this pull request Apr 3, 2024
Add GOAWAY NO_ERROR testcase in rfc7540_SUITE

Merged PR:
ninenines#312
@bjosv bjosv force-pushed the shutdown-no-error branch from dc0561e to 05dce22 Compare April 3, 2024 09:34
@bjosv
Copy link
Contributor

bjosv commented Apr 3, 2024

Rebased and updated the new testcase accordingly.

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.

[Bug] shutdown sends GOAWAY with reason internal error
3 participants