1.问题:Http请求,返回208, 提示设备空间不足
2.原因:起初以为是硬盘空间没了,其实不是。实际上是URLSession太多了
参考Stack Overflow:
It appears to get called when there are too many NSURLSessions created, reaching a limit of (in our tests) 600-700 sessions, which are not maintained or closed properly. The error started to get thrown since iOS 14, so it is interesting to see if there was a limit introduced.
3.解决方法:
因为我的网络请求使用的是AFNetworking库,起初是一个请求创建一个 AFHTTPSessionManager的实例,请求多了,自然就会有多个URLSession。