|
|
@@ -224,15 +224,13 @@
|
|
|
[operationDoing.dataTask cancel];
|
|
|
}
|
|
|
|
|
|
- operationDoing.dataTask = nil;
|
|
|
- operationDoing.session = nil;
|
|
|
- [operationDoing.handle closeFile];
|
|
|
- operationDoing.handle = nil;
|
|
|
-
|
|
|
- [self.downloadingOperationArr removeObject:operationDoing];
|
|
|
-
|
|
|
+// operationDoing.dataTask = nil;
|
|
|
+// operationDoing.session = nil;
|
|
|
+// [operationDoing.handle closeFile];
|
|
|
+// operationDoing.handle = nil;
|
|
|
}
|
|
|
|
|
|
+ [self.downloadingOperationArr removeAllObjects];
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -375,6 +373,11 @@ totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ //手动取消任务
|
|
|
+ if (operation.isManualCancel) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
// 获得已经下载的文件大小
|
|
|
operation.currentSize += data.length;
|
|
|
HLog(@"%@\n currentSize:%lld---progress:%.2f",operation.url, operation.currentSize, 1.00*operation.currentSize/operation.totalSize);
|