Check for connectivity issues #25

Merged
Jeremy Kescher merged 1 commits from jeremy/0128/connectivity into master 2020-01-29 11:31:22 +00:00
1 changed files with 6 additions and 0 deletions

View File

@ -394,6 +394,12 @@ class _ServerListState extends State<ServerList> {
return ServerStatus.dnsError;
}
try {
var _ = await HttpUtils.getForJson('https://dns.google.com/resolve');
} catch (SocketException) {
return ServerStatus.clientConnectivityIssues;
}
try {
// Check if host is IP address
InternetAddress(parsedUri.host);