Set NSOperationQueue op count to 1

This commit is contained in:
Deadpikle committed 2017-12-28 22:34:43 -05:00
1 parent f0460033ba
commit c886947f55
1 file changed
+5 -3
+5 -3
View File
@@ -29,10 +29,12 @@
- (void)startDownloadWithRequest:(SPUURLRequest *)request
{
NSOperationQueue *queue = [[NSOperationQueue alloc] init];
queue.maxConcurrentOperationCount = 1;
self.downloadSession = [NSURLSession
sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]
delegate:self
delegateQueue:[NSOperationQueue mainQueue]];
sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]
delegate:self
delegateQueue:queue];
self.download = [self.downloadSession downloadTaskWithRequest:request.request];
[self.download resume];
}