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

Documentation: How to handle GOAWAY #741

Open
eaufavor opened this issue Jan 17, 2024 · 2 comments
Open

Documentation: How to handle GOAWAY #741

eaufavor opened this issue Jan 17, 2024 · 2 comments

Comments

@eaufavor
Copy link
Contributor

The problem: it is not clear what a stream should do when receiving a GOAWAY h2 error.

Per https://datatracker.ietf.org/doc/html/rfc7540#section-6.8

GOAWAY allows an
endpoint to gracefully stop accepting new streams while still
finishing processing of previously established streams

So say when h2::RecvStream.data() gets an GOAWAY error, should we terminate the stream with an error or should we ignore this error (and continue processing)?

@dswij
Copy link
Member

dswij commented Jan 19, 2024

I guess it depends on the error code https://datatracker.ietf.org/doc/html/rfc7540#section-7, and up to the implementer to decide what to do.

@eaufavor
Copy link
Contributor Author

My question is how the APIs of this crate is designed regarding GOAWAY. For example if I get GOAWAY with NO_ERROR (graceful shutdown) when reading, should I just ignore it continue processing my request?

If that is true, what is the point of returning the such errors to streams, just FYI?

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

No branches or pull requests

2 participants