|
@@ -857,6 +857,7 @@ didReceiveResponse:(NSURLResponse *)response
|
|
|
{
|
|
|
HLog(@"取消任务-- %@--%@",fileModel.filename,fileModel.taskId)
|
|
|
|
|
|
+ BOOL didUnLockType = NO;
|
|
|
[_arrayLock lock];
|
|
|
|
|
|
for (customUploadOperation*operation in _uploadingOperationArr) {
|
|
@@ -864,6 +865,7 @@ didReceiveResponse:(NSURLResponse *)response
|
|
|
if([operation.fileModel.filename isEqualToString:fileModel.filename]){
|
|
|
operation.isCancelType = YES;
|
|
|
[operation.dataTask cancel];
|
|
|
+ didUnLockType = YES;
|
|
|
[_arrayLock unlock];
|
|
|
[self beginUploadAfterDeleteOperationBy:operation];
|
|
|
return;
|
|
@@ -873,14 +875,16 @@ didReceiveResponse:(NSURLResponse *)response
|
|
|
for (uploadFileDataModel*waitModel in _uploadWaitingUrlArr) {
|
|
|
if([waitModel.filename isEqualToString:fileModel.filename]){
|
|
|
[_uploadWaitingUrlArr removeObject:waitModel];
|
|
|
- [_arrayLock lock];
|
|
|
+ didUnLockType = YES;
|
|
|
+ [_arrayLock unlock];
|
|
|
[self beginUploadAfterDeleteOperationBy:nil];
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- [_arrayLock unlock];
|
|
|
-
|
|
|
+ if (!didUnLockType) {
|
|
|
+ [_arrayLock unlock];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#pragma mark 取消所有任务
|