aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-11-02 18:10:51 +0530
committerRoopesh Chander <roop@roopc.net>2018-11-02 18:10:51 +0530
commitf92fb1b9f46813a45d05389869f974e906b07028 (patch)
tree2a7bc449151b3795abeb250f8606316d9b9b6a76
parentInfo.plist: Update document icons and description (diff)
downloadwireguard-apple-f92fb1b9f46813a45d05389869f974e906b07028.tar.xz
wireguard-apple-f92fb1b9f46813a45d05389869f974e906b07028.zip
DNSResolver: Bugfix: Always call completion handler
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r--WireGuard/WireGuard/VPN/DNSResolver.swift5
1 files changed, 4 insertions, 1 deletions
diff --git a/WireGuard/WireGuard/VPN/DNSResolver.swift b/WireGuard/WireGuard/VPN/DNSResolver.swift
index 43e7c41..4ceabdc 100644
--- a/WireGuard/WireGuard/VPN/DNSResolver.swift
+++ b/WireGuard/WireGuard/VPN/DNSResolver.swift
@@ -53,7 +53,10 @@ class DNSResolver {
dispatchGroup.notify(queue: .main) {
assert(endpoints.count == resolvedEndpoints.count)
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]) {
DNSResolver.cache.setObject(resolvedEndpoint.stringRepresentation() as NSString,
forKey: endpoint.stringRepresentation() as NSString)