mirror of
https://github.com/status-im/react-native-fs.git
synced 2025-03-01 07:20:33 +00:00
Merge pull request #219 from nbolender/stopDownload-race-condition
iOS stopDownload Race Condition
This commit is contained in:
commit
aa3defe9e7
@ -107,6 +107,7 @@
|
||||
|
||||
- (void)stopDownload
|
||||
{
|
||||
if (_task.state == NSURLSessionTaskStateRunning) {
|
||||
[_task cancel];
|
||||
|
||||
NSError *error = [NSError errorWithDomain:@"RNFS"
|
||||
@ -117,5 +118,6 @@
|
||||
|
||||
return _params.errorCallback(error);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
x
Reference in New Issue
Block a user