Skip to content
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

Fix webrequest aggregated exceptions #1221

Merged
merged 5 commits into from
Sep 19, 2019

Conversation

UnityAlex
Copy link
Collaborator

Attempting to fix: https://issuetracker.unity3d.com/issues/cannot-access-a-disposed-object-exception-when-processing-requests-simultaneously-with-a-specified-timeout

The connection was being disposed of on one thread before another thread was still using the connection was done with it. Cherry picking some of the networking refactoring changesets appears to fix the problem.

Martin Baulig added 3 commits August 29, 2019 16:11
…rce`. (mono#7293)

This new helper class uses `TaskCompletionSource<>` internally, but instead
of using TrySetException(), it sets a result containing an `ExceptionDispatchInfo`.

The problem with using TrySetException() is that it wraps the exception
object in an `AggregateException`, that would be unobserved if the caller
throws the original exception.
…ono#10488. (mono#10595)

* [System]: Make sure `HttpWebRequest` observes exceptions on timeout. mono#10488.

`HttpWebRequest.RunWithTimeoutWorker()` needs to observe the worker task's exception
on timeout to prevent it from being thrown via the `TaskScheduler.UnobservedTaskException`
event.  Fixes mono#10488.

* Add `TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.OnlyOnCanceled` as suggested by Marek.

* Use 'OnlyFaulted' only.
@UnityAlex UnityAlex requested a review from joncham August 29, 2019 20:35
Martin Baulig and others added 2 commits September 6, 2019 10:25
Fix a regression introduced in the new web stack - when connecting
to a DNS host name that resolves to multiple IP addresses, we need
to probe them all.

On iOS, "localhost" will resolve to both "::1" and "127.0.0.1".
@UnityAlex UnityAlex merged commit d7070cc into unity-master Sep 19, 2019
@UnityAlex UnityAlex deleted the fix-webrequest-aggregated-exceptions branch September 19, 2019 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant