DNSResolver: Bugfix: Always call completion handler
Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
parent
29004c0ab6
commit
f92fb1b9f4
|
@ -53,7 +53,10 @@ class DNSResolver {
|
||||||
dispatchGroup.notify(queue: .main) {
|
dispatchGroup.notify(queue: .main) {
|
||||||
assert(endpoints.count == resolvedEndpoints.count)
|
assert(endpoints.count == resolvedEndpoints.count)
|
||||||
for (i, endpoint) in endpoints.enumerated() {
|
for (i, endpoint) in endpoints.enumerated() {
|
||||||
guard let endpoint = endpoint, let resolvedEndpoint = resolvedEndpoints[i] else { return }
|
guard let endpoint = endpoint, let resolvedEndpoint = resolvedEndpoints[i] else {
|
||||||
|
completionHandler(nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
if (isResolvedByDNSRequest[i]) {
|
if (isResolvedByDNSRequest[i]) {
|
||||||
DNSResolver.cache.setObject(resolvedEndpoint.stringRepresentation() as NSString,
|
DNSResolver.cache.setObject(resolvedEndpoint.stringRepresentation() as NSString,
|
||||||
forKey: endpoint.stringRepresentation() as NSString)
|
forKey: endpoint.stringRepresentation() as NSString)
|
||||||
|
|
Loading…
Reference in New Issue