Skip to content

Commit 6ad44ca

Browse files
Copilotsfmskywalker
andcommitted
Fix memory leak by using CommandContext.CancellationToken in BackgroundCommandSenderHostedService
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
1 parent d2aa888 commit 6ad44ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/common/Elsa.Mediator/HostedServices/BackgroundCommandSenderHostedService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private async Task ReadOutputAsync(Channel<CommandContext> output, CancellationT
6262
using var scope = _scopeFactory.CreateScope();
6363
var commandSender = scope.ServiceProvider.GetRequiredService<ICommandSender>();
6464

65-
await commandSender.SendAsync(commandContext.Command, CommandStrategy.Default, commandContext.Headers, cancellationToken);
65+
await commandSender.SendAsync(commandContext.Command, CommandStrategy.Default, commandContext.Headers, commandContext.CancellationToken);
6666
}
6767
catch (Exception e)
6868
{

0 commit comments

Comments
 (0)