Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAReachability类里的reachabilityInstance方法中对SCNetworkReachabilityRef的创建可能有问题吧 #94

Open
MrKang opened this issue Mar 22, 2022 · 1 comment

Comments

@MrKang
Copy link

MrKang commented Mar 22, 2022

reachabilityInstance方法中通过判断当前设备决定创建了ipv6或者v4类型的sockaddr_in对象,但是这里的ip都是默认全0的,把这个地址作为host传给SCNetworkReachabilityCreateWithAddress方法里来测试网络是否可用应该是有风险的吧?参考苹果文档里对SCNetworkReachability的描述,里面说了这种用法是不正确的,建议默认使用sdk上传数据的url作为hostname,使用SCNetworkReachabilityCreateWithName方法来创建Ref。不知道你们接不接受外人的PR?

@minchaozhang
Copy link
Contributor

感谢关注我们 SDK 的代码,欢迎提交 PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants