HttpClient does not behave well with invalid DNS settings, can hang or crash
- Dominant language
- C#
- Stars
- 2.9k
- Forks
- 576
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
### Steps to Reproduce
1. Setting wrong DNS at Ipad wifi setting (ex: 5.6.7.8)
2. Run App, Request HttpClient.PostAsync (https://github.com/xamarin/ios-samples/tree/main/HttpClient works)
3. App Frozen (or crash)
### Expected Behavior
Response Error in Catch()
### Actual Behavior
App Frozen
### Environment
Microsoft Visual Studio Enterprise 2019
Version 16.5.2
Xamarin.iOS and Xamarin.Mac SDK 13.16.0.11
Ipad Ios 12, 13, 14
System.Net.Http 4.3.4
I have a Xamarin.Ios application, which has a function that uses HttpClient.PostAsync
In case the Ipad is setting DNS correctly, the app works normally, no problem
However, when the DNS setting is wrong, the app will freeze, when running to handle HttpClient.PostAsync
At the output, I'm seeing that Task PostAsync cannot be completed (for a long time there is still no error at Catch())
Version of devices in use:
Ipad Ios 12, 13, 14
System.Net.Http 4.3.4
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.