File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -294,15 +294,14 @@ - (void)URLSession:(NSURLSession *)session
294
294
[self maybeRemoveTempFilesAtURL: _networkDirectoryURL
295
295
expiringTime: kGULNetworkTempFolderExpireTime ];
296
296
297
- NSString *sessionID = session.configuration .identifier ;
298
-
299
297
// This is called without checking the sessionID here since non-background sessions
300
298
// won't have an ID.
301
299
[session finishTasksAndInvalidate ];
302
300
303
301
// Explicitly remove the session so it won't be reused. The weak map table should
304
302
// remove the session on deallocation, but dealloc may not happen immediately after
305
303
// calling `finishTasksAndInvalidate`.
304
+ NSString *sessionID = session.configuration .identifier ;
306
305
[[self class ] setSessionInFetcherMap: nil forSessionID: sessionID];
307
306
}
308
307
@@ -688,7 +687,7 @@ + (void)setSessionInFetcherMap:(GULNetworkURLSession *)session forSessionID:(NSS
688
687
GULNetworkURLSession *existingSession =
689
688
[[[self class ] sessionIDToFetcherMap ] objectForKey: sessionID];
690
689
if (existingSession) {
691
- if (session != nil ) {
690
+ if (session) {
692
691
NSString *message = [NSString stringWithFormat: @" Discarding session: %@ " , existingSession];
693
692
[existingSession->_loggerDelegate GULNetwork_logWithLevel: kGULNetworkLogLevelInfo
694
693
messageCode: kGULNetworkMessageCodeURLSession019
You can’t perform that action at this time.
0 commit comments