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

Graceful handling for HTTP/2 GoAway frames. #733

Merged
merged 7 commits into from
Jun 26, 2023

Conversation

tomchristie
Copy link
Member

@tomchristie tomchristie commented Jun 16, 2023

Closes #730.

  • Raise ConnectionNotAvailable when appropriate with GoAway frames for requests that can gracefully be retried.
  • Some code refactoring
    • Stricter typing for ._events.
    • Stricter typing for ._connection_terminated.
    • Make logic in ._receive_events() clearer by having a switch on the event class.
  • New test cases for HTTP/2 GoAway frame behaviour with connection pools.
  • Behavior for some existing test cases switches from RemoteProtocolError to ConnectionNotAvailable.

@tomchristie tomchristie changed the title Refactor HTTP/2 stream events. Graceful handling for HTTP/2 GoAway frames. Jun 16, 2023
@tomchristie tomchristie added bug Something isn't working and removed refactor labels Jun 16, 2023
@tomchristie tomchristie requested a review from a team June 16, 2023 18:17
@tomchristie
Copy link
Member Author

Okay, this is a bit of a chunky one for review.
I'm happy to take it step-by-step instead if that's preferred.

httpcore/_sync/http2.py Outdated Show resolved Hide resolved
@tomchristie tomchristie requested a review from a team June 21, 2023 10:17
httpcore/_async/http2.py Outdated Show resolved Hide resolved
@tomchristie tomchristie requested a review from Pliner June 26, 2023 09:16
@tomchristie tomchristie merged commit 8d31f0b into master Jun 26, 2023
@tomchristie tomchristie deleted the refactor-http2-stream-events branch June 26, 2023 09:19
@tomchristie
Copy link
Member Author

🙏🏼 Thanks, @Pliner.

@zanieb
Copy link
Contributor

zanieb commented Jun 26, 2023

Wonderful. Thanks for taking this on @tomchristie !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Graceful handling for HTTP/2 GoAway frames.
3 participants