Imported Upstream version 5.16.0.174

Former-commit-id: e2ea24be26742a02d1739c3bc9240e899a6e80dd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-09-28 08:21:44 +00:00
parent fe5f08787c
commit 4d0627f707
44 changed files with 47 additions and 38 deletions

View File

@ -946,6 +946,11 @@ namespace System.Net
} catch {
// Ignore; we report the timeout.
}
#pragma warning disable 4014
// Make sure the workerTask's Exception is actually observed.
// Fixes https://github.com/mono/mono/issues/10488.
workerTask.ContinueWith (t => t.Exception?.GetHashCode (), TaskContinuationOptions.OnlyOnFaulted);
#pragma warning restore 4014
throw new WebException (SR.net_timeout, WebExceptionStatus.Timeout);
} catch (Exception ex) {
throw GetWebException (ex, aborted ());