Skip to content

Commit

Permalink
Ensure http client is disposed after execution
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Jul 8, 2024
1 parent c326841 commit 47e7193
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/File/AddCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AddCommand : Command

public override async Task<int> ExecuteAsync()
{
var http = HttpClientFactory.Create();
using var http = HttpClientFactory.Create();
var result = 0;

if (Files.Count == 0)
Expand Down Expand Up @@ -294,6 +294,6 @@ public override async Task<int> ExecuteAsync()
/// <summary>
/// Creates a clone of the current instance.
/// </summary>
protected virtual AddCommand Clone() => new AddCommand(Configuration);
protected virtual AddCommand Clone() => new AddCommand(Config.Build());
}
}

0 comments on commit 47e7193

Please sign in to comment.