Skip to content

[HTTP2StateMachine] test and fix HTTP2 go away #452

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

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

dnadoba
Copy link
Collaborator

@dnadoba dnadoba commented Oct 5, 2021

Motivation

  • we should not crash if we close a stream after we have received a go away event

Changes

  • rename AvailableConnectionContext to EstablishedConnectionContext to better communicate that the connection might actually not be available and already in the draining state
  • add connectionID property to EstablishedConnectionContext because we might need to schedule an idle timeout if the connection is idle and we do not execute any new requests
  • only lease streams if count is great then or equal to one
  • add variouse tests to verify correct handling of go away events

@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Oct 5, 2021
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

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

Nice, this is a good cleanup and tidy fix.

@dnadoba dnadoba merged commit a0b0985 into swift-server:main Oct 5, 2021
@dnadoba dnadoba deleted the dn-http2-go-away branch October 5, 2021 12:30
@fabianfett fabianfett added this to the HTTP/2 support milestone Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants