summaryrefslogtreecommitdiff
path: root/DomainDig/ReachabilityService.swift
diff options
context:
space:
mode:
Diffstat (limited to 'DomainDig/ReachabilityService.swift')
-rw-r--r--DomainDig/ReachabilityService.swift5
1 files changed, 3 insertions, 2 deletions
diff --git a/DomainDig/ReachabilityService.swift b/DomainDig/ReachabilityService.swift
index 0bb30ae..3fb7dd9 100644
--- a/DomainDig/ReachabilityService.swift
+++ b/DomainDig/ReachabilityService.swift
@@ -29,10 +29,11 @@ struct ReachabilityService {
}
}
- static func checkAll(domain: String) async -> [PortReachability] {
+ static func checkAll(domain: String) async -> ServiceResult<[PortReachability]> {
async let port443 = check(domain: domain, port: 443)
async let port80 = check(domain: domain, port: 80)
- return await [port443, port80]
+ let results = await [port443, port80]
+ return results.isEmpty ? .empty("No reachability results") : .success(results)
}
}