jamesmontemagno / Xamarin.Plugins

Cross-platform Native API Access from Shared Code!
MIT License
1.3k stars 380 forks source link

IsRemoteReachable returns true when there is no internet connection. #314

Closed VysotskiVadim closed 8 years ago

VysotskiVadim commented 8 years ago

Please take a moment to fill out the following (change to preview to check or place x in []):

This is a

Which plugin does this impact:

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?

jamesmontemagno commented 8 years ago

Copied to: https://github.com/jamesmontemagno/ConnectivityPlugin/issues/2

iletai commented 3 years ago

Any update here? @jamesmontemagno