From 25b1a4a673205d6305280ad01406a5c9a1c44368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E4=BA=9A=E6=B6=9B?= Date: Wed, 18 Nov 2015 21:03:27 +0800 Subject: [PATCH] correct wrong url situation --- AFDownloadRequestOperation.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AFDownloadRequestOperation.m b/AFDownloadRequestOperation.m index a85c157..97662a6 100644 --- a/AFDownloadRequestOperation.m +++ b/AFDownloadRequestOperation.m @@ -210,6 +210,9 @@ - (void)pause { - (id)responseObject { @synchronized(self) { + // found if i got wrong url, the failureBlock cannot callback. because of the self.error is set by super.responseObject. so: + [super responseObject]; + if (!_responseObject && [self isFinished] && !self.error) { NSError *localError = nil; if ([self isCancelled]) {