File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ - (NSString *)sessionIDFromAsyncPOSTRequest:(NSURLRequest *)request
128
128
129
129
if (didWriteFile) {
130
130
// Exclude this file from backing up to iTunes. There are conflicting reports that excluding
131
- // directory from backing up does not excluding files of that directory from backing up.
131
+ // directory from backing up does not exclude files of that directory from backing up.
132
132
[self excludeFromBackupForURL: _uploadingFileURL];
133
133
134
134
_sessionConfig = [self backgroundSessionConfigWithSessionID: _sessionID];
@@ -240,6 +240,7 @@ - (void)URLSession:(NSURLSession *)session
240
240
context: error];
241
241
_downloadedData = nil ;
242
242
}
243
+ [session finishTasksAndInvalidate ];
243
244
}
244
245
245
246
#if TARGET_OS_IOS || TARGET_OS_TV
@@ -250,6 +251,7 @@ - (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session
250
251
message: @" Background session finished"
251
252
context: session.configuration.identifier];
252
253
[self callSystemCompletionHandler: session.configuration.identifier];
254
+ [session finishTasksAndInvalidate ];
253
255
}
254
256
#endif
255
257
@@ -284,6 +286,7 @@ - (void)URLSession:(NSURLSession *)session
284
286
// Try to clean up stale files again.
285
287
[self maybeRemoveTempFilesAtURL: _networkDirectoryURL
286
288
expiringTime: kGULNetworkTempFolderExpireTime ];
289
+ [session finishTasksAndInvalidate ];
287
290
}
288
291
289
292
- (void )URLSession : (NSURLSession *)session
You can’t perform that action at this time.
0 commit comments