Skip to content

Commit f6ef8bf

Browse files
committed
optimize judge
1 parent 969291a commit f6ef8bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

QiniuSDK/Http/QNHttpManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ - (void)sendRequest:(NSMutableURLRequest *)request
178178
request.URL = url;
179179
domain = url.host;
180180
} else if (_dns != nil && [url.scheme isEqual:@"http"]) {
181-
if (![QNIP isV6] || isIpV6FullySupported()) {
181+
if (isIpV6FullySupported() || ![QNIP isV6]) {
182182
ips = [_dns queryWithDomain:[[QNDomain alloc] init:domain hostsFirst:NO hasCname:YES maxTtl:1000]];
183183
double duration = [[NSDate date] timeIntervalSinceDate:startTime];
184184
if (ips == nil || ips.count == 0) {

QiniuSDK/Http/QNSessionManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ - (void)sendRequest:(NSMutableURLRequest *)request
164164
request.URL = url;
165165
domain = url.host;
166166
} else if (_noProxy && _dns != nil && [url.scheme isEqualToString:@"http"]) {
167-
if (![QNIP isV6] || isIpV6FullySupported()) {
167+
if (isIpV6FullySupported() || ![QNIP isV6]) {
168168
ips = [_dns queryWithDomain:[[QNDomain alloc] init:domain hostsFirst:NO hasCname:YES maxTtl:1000]];
169169
double duration = [[NSDate date] timeIntervalSinceDate:startTime];
170170

0 commit comments

Comments
 (0)