New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetupHttpCapsClient fails in Unity #82
Comments
Thank you for taking the time to improve LibreMetaverse! We will review your contribution shortly. |
Potentially fixed in 2f743ad |
I tried out the changes, and it seems that #if NET_4_6 doesn't seem to be a working solution. I'm working towards using the pre-compiled net48 version of LibreMetaverse, which means that by the time Unity sees the .dll the #if NET_4_6 code has already been removed. I don't think we can rely on Unity's Compiler directives to solve this. Let me add more information about what I have tried today.
Scenario Two - Remove the NET_4_6 directive:
Side note: I ended up trying a bunch of different stuff because I was getting crash to desktop from the compiled unity exe under several different scenarios, but that turned out to be something crufty with my environment. When I forced Unity to do a 'Clean' build, I got the above described behavior. So my experimental observations are: This got me thinking about the System.Net.Http.dll. There are two different implementations of this, and I went looking at the source code for both trying to understand more: And then I remembered that at some point I had delibrately added the Microsoft System.Net.Http implementation to the unity project, and went and looked and its not there anymore. I added it back to the unity project, but the Mono Runtime seems to have ignored its presence. So my best guess is that i knows better than we do that it wants to use its own internal implementation. That's fine. I don't need to argue with them. At this point my full understanding is that the code probably doesn't even need the
since that will be true for all the LibreMetaverse.csproj Target Frameworks:
As such, this revision seems to be working just fine for me: I'm going to go ahead and make a pull request. |
We have a Unity project that using the Mono Scripting Backend, and the .Net Framework API Compatibility Level. We are referencing the netstandard2.1 version of the compiled assembly in the Unity Project.
We have found that the SetupHttpCapsClient code in GridClient, attempts to configure MaxConnectionsPerServer. The MaxConnectionsPerServer property is not supported on all platforms. We have found that if we take out the code to set that on the HttpClientHandler, then the HttpClientHandler works just fine.
See:
zangetsu-oe@72c1620
I'm not sure what's the correct way to go about making this particular line conditional, otherwise I would have and included a pull request.
Advice is appreciated.
The text was updated successfully, but these errors were encountered: