private static int GetMaxConnectionsPerServer() { int value = RuntimeSettingParser.QueryRuntimeSettingInt32( "System.Net.SocketsHttpHandler.MaxConnectionsPerServer", "DOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_MAXCONNECTIONSPERSERVER", int.MaxValue); // Disallow invalid values if (value < 1) { value = int.MaxValue; } return(value); }