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

[Feedback] HttpClient usage does not follow best practice #31

Open
thegrahamking opened this issue Jan 11, 2024 · 1 comment
Open

[Feedback] HttpClient usage does not follow best practice #31

thegrahamking opened this issue Jan 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@thegrahamking
Copy link

Given that the guidance is to create SinchClient as a singleton (see "With ASP.NET dependency injection") the HttpClient instance created if one is not specified via options.HttpClient or one that is captured by setting options.HttpClient in the singleton factory delegate will not obtain DNS updates and high throughput could exhaust the OS limit of available ports.

See

Suggestion

Replace options.HttpClient with options.HttpClientFactory and create and dispose HttpClient instances from the factory as needed.

@thegrahamking thegrahamking changed the title [Feedback] HtttpClient usage does not follow best practice [Feedback] HttpClient usage does not follow best practice Jan 11, 2024
@Dovchik Dovchik added the enhancement New feature or request label Jan 11, 2024
@Dovchik
Copy link
Contributor

Dovchik commented Jan 11, 2024

Thanks for your insight @thegrahamking, I'll take a look at what can be done and implemented into the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants