浏览代码

Fix AFImageDownloader stalling after number of failures reaches maximumActiveDownloads.

The active task count was only being decremented after success. Once
the number of failures reaches the maximumActiveDownloads, no more
tasks were being started.
Rick Silva 9 年之前
父节点
当前提交
cfed41d1cf
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      UIKit+AFNetworking/AFImageDownloader.m

+ 3 - 2
UIKit+AFNetworking/AFImageDownloader.m

@@ -244,9 +244,10 @@
                                            });
                                        }
                                    }
-                                   [strongSelf safelyDecrementActiveTaskCount];
-                                   [strongSelf safelyStartNextTaskIfNecessary];
+
                                }
+                               [strongSelf safelyDecrementActiveTaskCount];
+                               [strongSelf safelyStartNextTaskIfNecessary];
                            });
                        }];