Skip to content

Commit

Permalink
Merge pull request #84 from zangetsu-oe/master
Browse files Browse the repository at this point in the history
Fix Not Supported Setting MaxConnectionsPerServer on Mono, Fix NullReference on 'Prims' without Faces/TextureID
  • Loading branch information
cinderblocks committed Mar 11, 2023
2 parents 2f743ad + 428179a commit 5973734
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 2 additions & 4 deletions LibreMetaverse/GridClient.cs
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
9 changes: 2 additions & 7 deletions LibreMetaverse/Primitives/TextureEntry.cs
Expand Up @@ -768,16 +768,11 @@ public static TextureEntry FromOSD(OSD osd)

private void FromBytes(byte[] data, int pos, int length)
{
DefaultTexture = new TextureEntryFace(null);

if (length < 16)
{
// No TextureEntry to process
DefaultTexture = null;
return;
}
else
{
DefaultTexture = new TextureEntryFace(null);
}

uint bitfieldSize = 0;
uint faceBits = 0;
Expand Down

0 comments on commit 5973734

Please sign in to comment.