Closed rihadavid closed 8 years ago
I've just found that if called inside await Task.Run(()=>
it blocks my SQLite queries (or maybe all background code except UI?).
the hanging line is remoteHostReachability.TryGetFlags(out flags);
inside RemoteHostStatus()
.. this issue is also described on Xamarin Bugzilla
Same problem here. When connectivity drops, the complete app is freezing until connectivity is up again. Is there any solution or workaround?
You should absolutely not put this in your FinishedLaunching. Add it to your ViewController or Xamarin.Forms Page.
This is a scenario that is not supported.
This is a
Which plugin does this impact:
Version Number of Plugin: 2.1.2 Device Tested On: iPhone 4 / iOS 7.1.2 Simulator Tested On: iPhone 4s / iOS 8.1 (partially happening), iPhone 4s / iOS 9.3 (not happening)
Expected Behavior
CrossConnectivity.Current should always return the instance instantly (beacuse we cannot call it asynchronously)
Actual Behavior
Calling CrossConnectivity.Current on 100% loss connection (also probably wifi without the internet) takes up to 30 seconds to return, the slower device the longer time it takes. It's OK on iOS 9.3 simulator because it is fast, but terribly slow on iPhone 4 device.
If called from UI thread, it completely blocks the app until it returns.
Steps to reproduce the Behavior
Add
to
FinishedLaunching
right beforereturn true;