Skip to content

Commit

Permalink
fix:修复快手闪退的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
erichuyuehu committed Aug 22, 2023
1 parent c482736 commit fad83eb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions MSDKDns/CacheManager/MSDKDnsManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -1155,14 +1155,9 @@ - (void)detectHttpDnsServers {
}

- (NSString *)currentDnsServer {
// int index = self.serverIndex;
// if (index < [[[MSDKDnsParamsManager shareInstance] msdkDnsGetServerIps] count]) {
// return [[[MSDKDnsParamsManager shareInstance] msdkDnsGetServerIps] objectAtIndex:index];
// }
// return [[MSDKDnsParamsManager shareInstance] msdkDnsGetMDnsIp];
int index = self.serverIndex;
if (index < [self.dnsServers count]) {
return [self.dnsServers objectAtIndex:index];
if (self.dnsServers != nil && [self.dnsServers count] > 0 && index >= 0 && index < [self.dnsServers count]) {
return self.dnsServers[index];
}
return [[self defaultServers] firstObject];
}
Expand Down

0 comments on commit fad83eb

Please sign in to comment.