IsRemoteReachable returns true when there is no internet connection.
VysotskiVadim opened this issue · 2 comments
Please take a moment to fill out the following (change to preview to check or place x in []):
This is a
- Bug
- Feature Request
Which plugin does this impact:
- Battery
- Connectivity
- Contacts
- DeviceInfo
- ExternalMaps
- Geolocator
- Media
- Permissions
- Settings
- Text To Speech
- Vibrate
- Other:
Version Number of Plugin: 2.1.2
Device Tested On: IPhone 6
Expected Behavior
Connect to wifi with internet connection
Launch application
await CrossConnectivity.Current.IsRemoteReachable("google.com") is true
reconnect to wifi without internet connection
open application
await CrossConnectivity.Current.IsRemoteReachable("google.com") is false
Actual Behavior
Connect to wifi with internet connection
Launch application
await CrossConnectivity.Current.IsRemoteReachable("google.com") is true
reconnect to wifi without internet connection
open application
await CrossConnectivity.Current.IsRemoteReachable("google.com") is true
I've made short investigation and found this http://stackoverflow.com/questions/16895819/wp8-socket-connectasync-completed-handler-always-returns-success. It's strange because documentation(https://msdn.microsoft.com/ru-ru/library/bb538102(v=vs.110).aspx) says that: If you are using a connection-oriented protocol, the ConnectAsync method starts an asynchronous request for a connection to the remote host, I understood that for tcp ConnectAsync should wait for successful handshake... but anyway I will try advice from stack overflow.
Any ideas about it?
Copied to: jamesmontemagno/ConnectivityPlugin#2
Any update here? @jamesmontemagno