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

HttpClient fix for all locators #204

Merged
merged 1 commit into from Dec 9, 2019

Conversation

Indigo744
Copy link
Contributor

Continuing #198 and the issue found by @d8ahazard

This PR brings the following fixes:

  • use a shared HttpClient to avoid socket exhaustion
  • dispose of HttpResponseMessage
  • Add discovery test with all locators running in parallel

The rational to use a shared HttpClient is from:

This is actually the way the HueClient class is built, with either a shared HttpClient, or a given one by the user in the constructor.

I choose not to change the IBridgeLocator signature for now and use a local common HttpClient. But if you want me to add a new constructor signature to match the HueClient class, feel free to ask.

 * use a shared HttpClient to avoid socket exhaustion
 * dispose of HttpResponseMessage
 * Add discovery test with all locators running in parallel
@michielpost michielpost merged commit dfcc016 into michielpost:master Dec 9, 2019
@Indigo744 Indigo744 deleted the http_fix branch December 9, 2019 19:45
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.

None yet

2 participants