Closed rihadavid closed 8 years ago
I've just tested that it does not happen on iPhone 4 iOS 7 device. The issue might be related only to the specific situation I created with the wifi - I disabled IPv4 on my wireless network in windows settings so that the Mac simulator gets wifi but no internet. Maybe it's something that can't really happen in real world and maybe it can be ignored. You can try to reproduce it or close the issue if you think it can be ignored :) Just wanted to let you know, don't currently have much time to do some deep investigation and figuring out different ways to create wifi without internet for my simulator.
Can confirm this issue. If you have a device acting as a hotspot but with no Internet connectivity, the timeout doesn't work. In fact the timeout just adds time. I am trying rihadavid's solution.
Our setup has three devices: Electric fan that pressurizes/depressurizes a room. A digital gauge that controls the fan. A Xamarin app on an iOS device that controls the gauge.
In situations (like a new construction project) where wifi is not available, the gauge acts as a hotspot so the iOS device can connect and control the gauge.
IS this the best solution? (I know this ticket is closed)
Same here +1.
This is a
Which plugin does this impact:
Version Number of Plugin: 2.1.2 Simulator Tested On: iPhone 4s iOS 9.0 (13A344)
Expected Behavior
When on wifi without internet, calling
CrossConnectivity.Current.IsRemoteReachable()
with msTimeout set to 8000 should return false after 8000 seconds.Actual Behavior
When on wifi without internet, line
socket.ConnectAsync(socketEventArg);
insideCrossConnectivity.Current.IsRemoteReachable()
always takes 30 seconds, although it should only start the connection and not wait for anything.Suggested fix
calling the line through this function solves the issue but I am not sure if it is good practice:
If you think it's good solution, I can implement it and create pull request.