diff --git a/src/Microsoft.ComponentDetection.Detectors/pip/IPyPiClient.cs b/src/Microsoft.ComponentDetection.Detectors/pip/IPyPiClient.cs index d1c9abb1f..553a7dc58 100644 --- a/src/Microsoft.ComponentDetection.Detectors/pip/IPyPiClient.cs +++ b/src/Microsoft.ComponentDetection.Detectors/pip/IPyPiClient.cs @@ -83,7 +83,7 @@ public PyPiClient(IEnvironmentVariableService environmentVariableService, ILogge FinalCacheSize = 0, }; this.logger = logger; - this.semaphore = new SemaphoreSlim(10, 10); + this.semaphore = new SemaphoreSlim(5); } public static HttpClient HttpClient { get; internal set; } = new HttpClient(HttpClientHandler); diff --git a/src/Microsoft.ComponentDetection.Detectors/pip/SimplePypiClient.cs b/src/Microsoft.ComponentDetection.Detectors/pip/SimplePypiClient.cs index 8696761a7..8e58f1544 100644 --- a/src/Microsoft.ComponentDetection.Detectors/pip/SimplePypiClient.cs +++ b/src/Microsoft.ComponentDetection.Detectors/pip/SimplePypiClient.cs @@ -65,7 +65,7 @@ public SimplePyPiClient(IEnvironmentVariableService environmentVariableService, { this.environmentVariableService = environmentVariableService; this.logger = logger; - this.semaphore = new SemaphoreSlim(10, 10); + this.semaphore = new SemaphoreSlim(5); } public static HttpClient HttpClient { get; internal set; } = new HttpClient(HttpClientHandler); @@ -287,7 +287,6 @@ public void Dispose() this.cacheTelemetry.Dispose(); this.cachedProjectWheelFiles.Dispose(); this.cachedSimplePyPiProjects.Dispose(); - HttpClient.Dispose(); this.semaphore.Dispose(); } }