Skip to content

Commit

Permalink
Merge pull request #76 from crcunningham/master
Browse files Browse the repository at this point in the history
Fix mistake where uploads are cancel by mistake on macOS
  • Loading branch information
MMasterson committed Aug 3, 2020
2 parents 361e232 + 883aa90 commit 91f94d7
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions TUSKit/TUSResumableUpload.m
Expand Up @@ -408,8 +408,6 @@ - (BOOL)createFile
[weakself.delegate saveUpload:weakself]; // Save current state for reloading - only save when we get a call back, not at the start of one (because this is the only time the state changes)
#if TARGET_OS_IPHONE
[[UIApplication sharedApplication] endBackgroundTask:bgTask];
#elif defined TARGET_OS_OSX
[weakself cancel];
#endif

if (delayTime > 0) {
Expand Down Expand Up @@ -514,8 +512,6 @@ - (BOOL) checkFile
[weakself.delegate saveUpload:weakself]; // Save current state for reloading - only save when we get a call back, not at the start of one (because this is the only time the state changes)
#if TARGET_OS_IPHONE
[[UIApplication sharedApplication] endBackgroundTask:bgTask];
#elif defined TARGET_OS_OSX
[weakself cancel];
#endif
if (delayTime > 0) {
__weak NSOperationQueue *weakQueue = [NSOperationQueue currentQueue];
Expand Down Expand Up @@ -610,8 +606,6 @@ -(BOOL)uploadFile
[weakself.delegate saveUpload:weakself]; // Save current state for reloading - only save when we get a call back, not at the start of one (because this is the only time the state changes)
#if TARGET_OS_IPHONE
[[UIApplication sharedApplication] endBackgroundTask:bgTask];
#elif defined TARGET_OS_OSX
[weakself cancel];
#endif
[weakself continueUpload]; // Continue upload, not resume, because we do not want to continue if cancelled.
}];
Expand Down

0 comments on commit 91f94d7

Please sign in to comment.