From c853026d2e160fa6c381ea228396527f38972662 Mon Sep 17 00:00:00 2001 From: Zhang Linghua Date: Fri, 3 Aug 2018 16:00:18 +0900 Subject: [PATCH] Limit request number to avoid mass request --- Sources/LicensePlistCore/Entity/PlistInfo.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/LicensePlistCore/Entity/PlistInfo.swift b/Sources/LicensePlistCore/Entity/PlistInfo.swift index 7c7b7b68..f39b653f 100644 --- a/Sources/LicensePlistCore/Entity/PlistInfo.swift +++ b/Sources/LicensePlistCore/Entity/PlistInfo.swift @@ -63,6 +63,7 @@ struct PlistInfo { guard let githubLibraries = githubLibraries else { preconditionFailure() } let queue = OperationQueue() + queue.maxConcurrentOperationCount = 10 let carthageOperations = githubLibraries.map { GitHubLicense.download($0) } queue.addOperations(carthageOperations, waitUntilFinished: true) githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }