From c886947f557c78216c5ce32b9ce960563dcf81ef Mon Sep 17 00:00:00 2001 From: Deadpikle Date: Thu, 28 Dec 2017 22:34:34 -0500 Subject: [PATCH] Set NSOperationQueue op count to 1 --- Sparkle/SPUDownloaderSession.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Sparkle/SPUDownloaderSession.m b/Sparkle/SPUDownloaderSession.m index 88470ce5..4dd0e961 100644 --- a/Sparkle/SPUDownloaderSession.m +++ b/Sparkle/SPUDownloaderSession.m @@ -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]; }