Skip to content

Commit 2b27e1f

Browse files
committed
Release our lock when we encounter a canceled task
This early-out condition would exit while still holding our lock, resulting in Very Bad Things (tm) down the line.
1 parent ce50f3c commit 2b27e1f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Pod/Classes/PINRemoteImageManager.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ - (NSUUID *)downloadImageWithURL:(NSURL *)url
390390
[strongSelf lock];
391391
//check canceled tasks first
392392
if ([strongSelf.canceledTasks containsObject:UUID]) {
393+
[strongSelf unlock];
393394
return;
394395
}
395396
[strongSelf.canceledTasks removeAllObjects];

0 commit comments

Comments
 (0)