From bfb91642072c08050d3d4cf60a77390dfe5a83bf Mon Sep 17 00:00:00 2001 From: erichuyuehu Date: Mon, 10 Jul 2023 15:35:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A4=84=E7=90=86=E5=8F=8C=E6=A0=88?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MSDKDns/Resolver/HttpsDnsResolver.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MSDKDns/Resolver/HttpsDnsResolver.m b/MSDKDns/Resolver/HttpsDnsResolver.m index be55da8..2ab0439 100644 --- a/MSDKDns/Resolver/HttpsDnsResolver.m +++ b/MSDKDns/Resolver/HttpsDnsResolver.m @@ -43,7 +43,7 @@ - (void)startWithDomains:(NSArray *)domains TimeOut:(float)timeOut DnsId:(int)dn id delegate = self.delegate; self.errorCode = MSDKDns_UnResolve; if (!domainStr || domainStr.length == 0) { - MSDKDNSLOG(@"HttpDns Domain is must needed!"); + MSDKDNSLOG(@"HttpDns Domain is must needed!"); self.domainInfo = nil; self.isFinished = YES; self.isSucceed = NO; @@ -266,6 +266,10 @@ - (NSDictionary *)parseAllIPString:(NSString *)iPstring { } } + // 当双栈解析请求中ipv4和ipv6的结果都不符合预期,就返回ni走getDomainError逻辑 + if (bothIPDict.count == 0){ + return nil; + } return bothIPDict; } else { BOOL use4A = false;