Skip to content
This repository was archived by the owner on Feb 27, 2022. It is now read-only.

Commit 3ce84d8

Browse files
author
Elad Gil
committed
removed downloadOperationsQueue
1 parent fd86871 commit 3ce84d8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ios/RNBackgroundDownloader.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ @implementation RNBackgroundDownloader {
2222
NSMutableDictionary<NSString *, NSData *> *idToResumeDataMap;
2323
NSMutableDictionary<NSString *, NSNumber *> *idToPercentMap;
2424
NSMutableDictionary<NSString *, NSDictionary *> *progressReports;
25-
NSOperationQueue *downloadOperationsQueue;
2625
NSDate *lastProgressReport;
2726
}
2827

@@ -67,7 +66,6 @@ - (id) init {
6766
NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
6867
NSString *sessonIdentifier = [bundleIdentifier stringByAppendingString:@".backgrounddownloadtask"];
6968
sessionConfig = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:sessonIdentifier];
70-
downloadOperationsQueue = [[NSOperationQueue alloc] init];
7169
progressReports = [[NSMutableDictionary alloc] init];
7270
lastProgressReport = [[NSDate alloc] init];
7371
}
@@ -76,7 +74,7 @@ - (id) init {
7674

7775
- (void)lazyInitSession {
7876
if (urlSession == nil) {
79-
urlSession = [NSURLSession sessionWithConfiguration:sessionConfig delegate:self delegateQueue:downloadOperationsQueue];
77+
urlSession = [NSURLSession sessionWithConfiguration:sessionConfig delegate:self delegateQueue:nil];
8078
}
8179
}
8280

0 commit comments

Comments
 (0)