Skip to content

Commit

Permalink
Limit request number to avoid mass request
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhang Linghua committed Aug 3, 2018
1 parent 14bcf93 commit c853026
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/LicensePlistCore/Entity/PlistInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit c853026

Please sign in to comment.