mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 01:21:14 +00:00
Merge pull request 'fix: Wrap DNS check in catch to avoid runtime crash' (#322) from dns-check-fix into master
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/322 Reviewed-by: Inex Code <inex.code@selfprivacy.org>
This commit is contained in:
commit
63ac367007
|
@ -218,19 +218,23 @@ class ServerInstallationRepository {
|
||||||
final Map<String, bool> skippedMatches,
|
final Map<String, bool> skippedMatches,
|
||||||
) async {
|
) async {
|
||||||
final Map<String, bool> matches = <String, bool>{};
|
final Map<String, bool> matches = <String, bool>{};
|
||||||
await InternetAddress.lookup(domainName!).then(
|
try {
|
||||||
(final records) {
|
await InternetAddress.lookup(domainName!).then(
|
||||||
for (final record in records) {
|
(final records) {
|
||||||
if (skippedMatches[record.host] ?? false) {
|
for (final record in records) {
|
||||||
matches[record.host] = true;
|
if (skippedMatches[record.host] ?? false) {
|
||||||
continue;
|
matches[record.host] = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (record.address == ip4!) {
|
||||||
|
matches[record.host] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (record.address == ip4!) {
|
},
|
||||||
matches[record.host] = true;
|
);
|
||||||
}
|
} catch (e) {
|
||||||
}
|
print(e);
|
||||||
},
|
}
|
||||||
);
|
|
||||||
|
|
||||||
return matches;
|
return matches;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue