new InetSocketAddress(host, port); can take minutes when on wifi with
poor or none internet connectivity. Moving it to new thread and creating
timeout delay in new task solves the problem. Creating delay Task does
not solve the problem, calling await Task.WhenAny(Task.Delay(5000),
CrossConnectivity.Current.IsRemoteReachable(host, 80, 5000)); takes
minutes too.
new InetSocketAddress(host, port); can take minutes when on wifi with poor or none internet connectivity. Moving it to new thread and creating timeout delay in new task solves the problem. Creating delay Task does not solve the problem, calling await Task.WhenAny(Task.Delay(5000), CrossConnectivity.Current.IsRemoteReachable(host, 80, 5000)); takes minutes too.