dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.91k stars 4.63k forks source link

CurlHandler Does Not Respect MaxConnectionsPerServer Property #23385

Closed NickGerleman closed 4 years ago

NickGerleman commented 7 years ago

Setting MaxConnectionsPerServer on an HttpClientHandler doesn't do anything on Unix systems. The property is propagated to CurlHandler which stores it as an instance variable but doesn't ever use it. This seems like an oversight since documentation for libcurl shows it can be set, and there is already piping to set related settings in CurlHandler.MultiAgent.cs.

stephentoub commented 7 years ago

The property is propagated to CurlHandler which stores it as an instance variable but doesn't ever use it

It's used here: https://github.com/dotnet/corefx/blob/a27929935d2782cdc3e7be21653e8c4530274c6f/src/System.Net.Http/src/System/Net/Http/Unix/CurlHandler.MultiAgent.cs#L261

NickGerleman commented 7 years ago

My apologies, I only looked in the file where the property existed and forgot to look for partial classes.