Skip to content

Commit fff5847

Browse files
committed
Remove get outer net IP process
1 parent e152c33 commit fff5847

File tree

1 file changed

+10
-9
lines changed
  • VideoPlsUtilsPlatformSDK/VideoPlsUtilsPlatformSDK/VideoPlsUtilsPlatformSDK/Common/Utils

1 file changed

+10
-9
lines changed

VideoPlsUtilsPlatformSDK/VideoPlsUtilsPlatformSDK/VideoPlsUtilsPlatformSDK/Common/Utils/VPUPIPAddressUtil.m

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ + (instancetype)sharedIPAddressUtil {
5353
dispatch_once(&onceToken, ^{
5454
_sharedIPAddressUtil = [[self alloc] init];
5555
_sharedIPAddressUtil.currentReachabilityStatus = [VPUPNetworkReachabilityManager sharedManager].currentReachabilityStatus;
56-
_sharedIPAddressUtil.ipAddress = [VPUPIPAddressUtil deviceWANIPAddress];
56+
// _sharedIPAddressUtil.ipAddress = [VPUPIPAddressUtil deviceWANIPAddress];
5757
});
5858
return _sharedIPAddressUtil;
5959
}
@@ -98,15 +98,16 @@ + (NSString *)deviceWANIPAddress {
9898

9999
+ (NSString *)currentIpAddress {
100100

101-
if ([VPUPIPAddressUtil sharedIPAddressUtil].currentReachabilityStatus != [VPUPNetworkReachabilityManager sharedManager].currentReachabilityStatus) {
102-
[VPUPIPAddressUtil sharedIPAddressUtil].currentReachabilityStatus = [VPUPNetworkReachabilityManager sharedManager].currentReachabilityStatus;
103-
[VPUPIPAddressUtil sharedIPAddressUtil].ipAddress = [VPUPIPAddressUtil deviceWANIPAddress];
104-
}
101+
return [self getIPAddress:YES];
105102

106-
if ([VPUPIPAddressUtil sharedIPAddressUtil].ipAddress.length < 1) {
107-
[VPUPIPAddressUtil sharedIPAddressUtil].ipAddress = [VPUPIPAddressUtil deviceWANIPAddress];
108-
}
109-
return [VPUPIPAddressUtil sharedIPAddressUtil].ipAddress;
103+
// if ([VPUPIPAddressUtil sharedIPAddressUtil].currentReachabilityStatus != [VPUPNetworkReachabilityManager sharedManager].currentReachabilityStatus) {
104+
// [VPUPIPAddressUtil sharedIPAddressUtil].currentReachabilityStatus = [VPUPNetworkReachabilityManager sharedManager].currentReachabilityStatus;
105+
// [VPUPIPAddressUtil sharedIPAddressUtil].ipAddress = [VPUPIPAddressUtil deviceWANIPAddress];
106+
// }
107+
//
108+
// if ([VPUPIPAddressUtil sharedIPAddressUtil].ipAddress.length < 1) {
109+
// [VPUPIPAddressUtil sharedIPAddressUtil].ipAddress = [VPUPIPAddressUtil deviceWANIPAddress];
110+
// }
110111
}
111112

112113
+ (NSString *)getIPAddress:(BOOL)preferIPv4 {

0 commit comments

Comments
 (0)