Skip to content

Close the global http client after ensurePubspecResolved #4199

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 2 commits into from
Mar 25, 2024

Conversation

sigurdm
Copy link
Contributor

@sigurdm sigurdm commented Mar 25, 2024

@@ -52,6 +53,8 @@ Future<void> ensurePubspecResolved(
);
} on ApplicationException catch (e) {
throw ResolutionFailedException._(e.toString());
} finally {
globalHttpClient.close();
Copy link
Member

Choose a reason for hiding this comment

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

Can we give it a documentation comment.

This is a bit of a hack, I don't mind. But ideally, we'd do something reasonable like creating an a client pass it in, and close it at the end. Or if we don't want to pass it around use zones or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But ideally, we'd do something reasonable like creating an a client pass it in, and close it at the end.
Or if we don't want to pass it around use zones or something.

Yeah - that would be better...
I'll add a comment.

@sigurdm sigurdm merged commit 3f0df78 into dart-lang:master Mar 25, 2024
@sigurdm sigurdm requested a review from jonasfj March 25, 2024 14:24
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

Successfully merging this pull request may close these issues.

2 participants