Skip to content

Commit

Permalink
Only skip setting MaxConnectionsPerServer when runtime is Mono
Browse files Browse the repository at this point in the history
  • Loading branch information
zangetsu.oe committed Mar 11, 2023
1 parent 9a37fdc commit 95457c1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions LibreMetaverse/GridClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,10 @@ 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 95457c1

Please sign in to comment.