Merge pull request #245 from locly/master

[iOS] Cancelling download causes promise rejection to be called twice
This commit is contained in:
Hagen Hübel
2017-04-28 02:16:15 +02:00
committed by GitHub
+3 -1
View File
@@ -106,7 +106,9 @@
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
{
return error ? _params.errorCallback(error) : nil;
if (error && error.code != -999) {
_params.errorCallback(error);
}
}
- (void)stopDownload