Skip to content

Commit

Permalink
Dispose HttpClient in WorkloadManifestUpdater
Browse files Browse the repository at this point in the history
HttpClient is an IDisposable, so wrap it with a `using` to call
Dispose() it.
  • Loading branch information
omajid committed Jun 7, 2024
1 parent 4623874 commit 4a40128
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,8 @@ public IEnumerable<ManifestVersionUpdate> ParseRollbackDefinitionFiles(IEnumerab

if (Uri.TryCreate(rollbackDefinitionFilePath, UriKind.Absolute, out var rollbackUri) && !rollbackUri.IsFile)
{
fileContent = (new HttpClient()).GetStringAsync(rollbackDefinitionFilePath).Result;
using HttpClient httpClient = new();
fileContent = httpClient.GetStringAsync(rollbackDefinitionFilePath).Result;
}
else
{
Expand Down

0 comments on commit 4a40128

Please sign in to comment.