Skip to content

Commit

Permalink
Adding cancellation token check.
Browse files Browse the repository at this point in the history
Signed-off-by: André Silva <[email protected]>
  • Loading branch information
askpt committed Aug 23, 2024
1 parent cf1f05f commit 6bd175b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ internal sealed class OpenFeatureHostedService(Api api, IEnumerable<FeatureProvi

async Task IHostedLifecycleService.StartingAsync(CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();

foreach (var provider in this._providers)
{
await this._api.SetProviderAsync(provider.GetMetadata()?.Name ?? string.Empty, provider).ConfigureAwait(false);
Expand Down

0 comments on commit 6bd175b

Please sign in to comment.