Skip to content

Ensure the HTTPConnectionPool calls shutdown on active connections. #422

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

Conversation

fabianfett
Copy link
Member

Motivation

Currently active connections are just closed on shutdown. We expect running requests to be cancelled though.

Changes

  • Trigger the correct method on HTTPConnectionPool.Connection to cancel the request and close the connection then
  • Add a test

Result

A better behaving http client.

@fabianfett fabianfett requested review from glbrntt and Lukasa and removed request for glbrntt September 13, 2021 10:00
@fabianfett
Copy link
Member Author

@swift-server-bot test this please

@fabianfett fabianfett added the 🔨 semver/patch No public API change. label Sep 13, 2021
@fabianfett fabianfett merged commit 5d2bf92 into swift-server:main Sep 13, 2021
@fabianfett fabianfett deleted the ff-shutdown-active-connections branch September 13, 2021 12:57
@fabianfett fabianfett added this to the HTTP/2 support milestone Sep 13, 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.

2 participants