Skip to content

Commit e212728

Browse files
authored
Merge pull request #214 from ghinwallc/bug-fix/use-existing-nsurlsessiontaskdelegate-method
Use existing NSURLSessionTaskDelegate method
2 parents 8c9c49b + a639f49 commit e212728

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Downloader.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTas
100100
return _params.completeCallback(_statusCode, _bytesWritten);
101101
}
102102

103-
- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionTask *)downloadTask didCompleteWithError:(NSError *)error
103+
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
104104
{
105-
return _params.errorCallback(error);
105+
return error ? _params.errorCallback(error) : nil;
106106
}
107107

108108
- (void)stopDownload

0 commit comments

Comments
 (0)