Skip to content

Commit

Permalink
Update BackgroundTickService.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
pomianowski committed May 9, 2024
1 parent ee29a19 commit 79c82cf
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ private async Task TickInBackground(CancellationToken cancellationToken)

while (true)
{
if (cancellationToken.IsCancellationRequested)
{
break;
}

await eventBus.PublishAsync(
new BackgroundTicked(random.Next(10, 1001)),
cancellationToken
Expand Down

0 comments on commit 79c82cf

Please sign in to comment.