Check for connectivity issues #25
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue