AFNetworking 更新导致的 bug

昨天调试 NCMusicEngine 的时候发现了一个 bug. 调试了半天才发现是引用的 AFNetworking 模块新版本的更新引入的一个新功能导致的.

之前在 AFNetworking 里 cancel 掉一个 operation 是没有其他额外的影响的, 但是新版本里, operation 的 cancel 操作会导致 CompletionBlockWithSuccess 的 failure. Error Code 是 -999.

所以在更新了 AFNetworking 后, 如果之前的代码里有对 operation 的 cancel 操作, 那就要注意这一点了.

Github 上这个新功能的 pull request: https://github.com/AFNetworking/AFNetworking/pull/693

Donate 😘 您的支持将鼓励我继续创作
0%