Skip to content

Commit

Permalink
[expo-file-system] Fix session lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
lukmccall committed Apr 2, 2020
1 parent 9fec50a commit 4596415
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/expo-file-system/ios/EXFileSystem/EXFileSystem.m
Expand Up @@ -675,9 +675,10 @@ - (NSDictionary *)encodingMap
reject(@"E_UNABLE_TO_PAUSE",
@"There was an error producing resume data",
nil);
[self unregister:session uuid:uuid];
[session invalidateAndCancel];
}

[self unregister:session uuid:uuid];
[session invalidateAndCancel];
}];
}
}
Expand Down Expand Up @@ -899,6 +900,7 @@ - (NSNumber *)freeDiskStorage {
- (void)unregister:(NSURLSession *)session
{
[_sessions removeObject:session];
[session invalidateAndCancel];
}

- (void)unregister:(NSURLSession *)session uuid:(NSString *)uuid
Expand Down

0 comments on commit 4596415

Please sign in to comment.