This bug is similar to bug 16849
Start a http(s) request on Xamarin Android or iOS and the server side never
returns headers response initiating a Server Sent Events connection. Disconnect network cable, or on a physical device change to Airplane Mode. The standing stream.ReadAsync does not fail, it hangs.
Open attached solution
Run sample in an Android API 15 emulator
Let the sample run for 1 minute, notice there is a stream.readAsync completing every 10 seconds
Disconnect network cable, notice the application does not detect the failure, stream.readAsync just hangs
Please attach the sample project
Just as with https://bugzilla.xamarin.com/show_bug.cgi?id=16849#c1 network disconnects are notoriously difficult.
That said, are you enabling IOControlCode.KeepAliveValues?
Created attachment 5709 [details]
Stream hanging sample
I have verified this issue and reproduced at my end, following are the steps:
1. Download attached project.
2. Debug on API 15 and noticed a stream.readAsync printing in every 10 seconds
3. After 1 minute I unplugged internet connection.
4. stream.readAsync logging on app is stoped and no message displayed.
5. I connected internet again and observed that stream.readAsync printed "Done" on application
Refer attached screenshot: http://screencast.com/t/1u2V1AjR
XS 4.2.2 (build 2)
API 15 emulator