Eradicate ☠ Mono ☠

Co-Authored-By: Gustas <37534529+punkpun@users.noreply.github.com>
This commit is contained in:
michaeldgg2
2024-09-13 23:01:58 +02:00
committed by Pavel Penev
parent 5450572e0a
commit c7cc9a68fd
35 changed files with 89 additions and 634 deletions

View File

@@ -16,10 +16,8 @@ namespace OpenRA.Support
{
public static class HttpClientFactory
{
#if NET5_0_OR_GREATER
const int MaxConnectionPerServer = 20;
static readonly TimeSpan ConnectionLifeTime = TimeSpan.FromMinutes(1);
#endif
static readonly Lazy<HttpMessageHandler> Handler = new(GetHandler);
@@ -30,7 +28,6 @@ namespace OpenRA.Support
static HttpMessageHandler GetHandler()
{
#if NET5_0_OR_GREATER
return new SocketsHttpHandler
{
// https://github.com/dotnet/corefx/issues/26895
@@ -40,9 +37,6 @@ namespace OpenRA.Support
PooledConnectionIdleTimeout = ConnectionLifeTime,
MaxConnectionsPerServer = MaxConnectionPerServer
};
#else
return new HttpClientHandler();
#endif
}
}
}