You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
If WebServiceRequestSettings.GetHttpClient is not used, a new HttpClient and HttpClientHandler are created for every request. This has been observed to lead to sockets being left open indefinitely and eventual resource starvation on .NET Core on Linux.
The lifetime of the default HttpClientHandler should be managed some how, possibly as a shared static or scoped to the lifetime of the client.
Alternatively, always require WebServiceRequestSettings.GetHttpClient to be provided.
The text was updated successfully, but these errors were encountered:
An issue with sharing the HttpClientHandler is that the WebServiceRequest.DisableAutoRedirect option is per-request, but it is implemented by setting HttpClientHandler.AllowAutoRedirect. The Libronix version of this option is used by Faithlife code in several places related to authentication and LibApi. Some options for handling this are:
Implement redirect handling with a MessageProcessingHandler in the handler chain.
Remove redirect support.
Move DisableAutoRedirect from WebServiceRequest to WebServiceRequestSettings.
Moving DisableAutoRedirect would be the most straight-forward change for this library. The consumers should be able to accommodate the change without trouble.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If
WebServiceRequestSettings.GetHttpClient
is not used, a newHttpClient
andHttpClientHandler
are created for every request. This has been observed to lead to sockets being left open indefinitely and eventual resource starvation on .NET Core on Linux.The lifetime of the default
HttpClientHandler
should be managed some how, possibly as a shared static or scoped to the lifetime of the client.Alternatively, always require
WebServiceRequestSettings.GetHttpClient
to be provided.The text was updated successfully, but these errors were encountered: