fix: Wrap DNS check in catch to avoid runtime crash #322

Merged
NaiJi merged 1 commits from dns-check-fix into master 2023-09-05 14:43:03 +03:00
1 changed files with 16 additions and 12 deletions

View File

@ -218,6 +218,7 @@ class ServerInstallationRepository {
final Map<String, bool> skippedMatches,
) async {
final Map<String, bool> matches = <String, bool>{};
try {
await InternetAddress.lookup(domainName!).then(
(final records) {
for (final record in records) {
@ -231,6 +232,9 @@ class ServerInstallationRepository {
}
},
);
} catch (e) {
print(e);
}
return matches;
}