Skip to content

Commit

Permalink
Hackity hack workaround Unity configs potentially fixing #82
Browse files Browse the repository at this point in the history
  • Loading branch information
cinderblocks committed Mar 11, 2023
1 parent 8edce0b commit 2f743ad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion LibreMetaverse/GridClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ private HttpCapsClient SetupHttpCapsClient()
{
AllowAutoRedirect = true,
AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip,
MaxConnectionsPerServer = Settings.MAX_HTTP_CONNECTIONS,
ServerCertificateCustomValidationCallback = (message, cert, chain, sslPolicyErrors) =>
{
if (sslPolicyErrors == SslPolicyErrors.None)
Expand All @@ -157,6 +156,12 @@ private HttpCapsClient SetupHttpCapsClient()
return true;
}
};
#if NETSTANDARD2_1_OR_GREATER || NET48_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#if NET_4_6 // a unity preproc def, not to be confused with NET46 from MS!
if (Utils.GetRunningRuntime() != Utils.Runtime.Mono)
#endif
handler.MaxConnectionsPerServer = Settings.MAX_HTTP_CONNECTIONS;
#endif
HttpCapsClient client = new HttpCapsClient(handler);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Add("User-Agent", $"{Settings.USER_AGENT}");
Expand Down

0 comments on commit 2f743ad

Please sign in to comment.