Skip to content

make sure HTTPClient is shutdown #98

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
Sep 5, 2019
Merged

make sure HTTPClient is shutdown #98

merged 1 commit into from
Sep 5, 2019

Conversation

weissi
Copy link
Contributor

@weissi weissi commented Sep 5, 2019

Motivation:

Right now, HTTPClient only asserts that it's shut down if it was started with its own EventLoopGroup.
That however is weird because it's lifecycle model depends on the parameters you pass to init.

Modifications:

Always validate the lifecycle (in debug mode).

Result:

  • API makes more sense.
  • this is especially important once we get a connection pool, don't want to have the connections sitting around forever without the possibility of every being used again.

@weissi weissi requested a review from artemredkin September 5, 2019 08:14
@weissi weissi added this to the 1.0.0 milestone Sep 5, 2019
@weissi weissi added the 🆕 semver/minor Adds new public API. label Sep 5, 2019
Motivation:

Right now, HTTPClient only asserts that it's shut down if it was started with its own EventLoopGroup.
That however is weird because it's lifecycle model depends on the parameters you pass to `init`.

Modifications:

Always validate the lifecycle (in debug mode).

Result:

API makes more sense.
@weissi weissi merged commit 26afbc1 into master Sep 5, 2019
@weissi weissi deleted the jw-deinit-assert branch September 5, 2019 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants