Skip to content

Commit

Permalink
Fix re-queuing of messages when the npgsql connection is broken
Browse files Browse the repository at this point in the history
if the npgsql connection is broken the cancellation token used here is triggered resulting in this message being lost as it will not be written to the channel
  • Loading branch information
williamdenton committed Jun 7, 2024
1 parent 9fa73fd commit bbeec9f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private async Task HandleMessage(NpgsqlConnection connection, CancellationToken
// if we cannot send the message we put it back into the channel
foreach (var message in messages)
{
await _channel.Writer.WriteAsync(message, ct);
await _channel.Writer.WriteAsync(message, CancellationToken.None);
}
}
}
Expand Down

0 comments on commit bbeec9f

Please sign in to comment.