diff --git a/src/Aspire.Hosting/Health/ResourceHealthCheckScheduler.cs b/src/Aspire.Hosting/Health/ResourceHealthCheckScheduler.cs index 89823798a63..6a6b28f8dff 100644 --- a/src/Aspire.Hosting/Health/ResourceHealthCheckScheduler.cs +++ b/src/Aspire.Hosting/Health/ResourceHealthCheckScheduler.cs @@ -13,7 +13,7 @@ internal class ResourceHealthCheckScheduler : BackgroundService private readonly ResourceNotificationService _resourceNotificationService; private readonly DistributedApplicationModel _model; private readonly Dictionary _checkEnablement = new(); - private readonly List _healthyResources = new(); + private readonly HashSet _healthyResources = new(); public ResourceHealthCheckScheduler(ResourceNotificationService resourceNotificationService, DistributedApplicationModel model, IDistributedApplicationEventing eventing) { diff --git a/src/Aspire.Hosting/Health/ResourceNotificationHealthCheckPublisher.cs b/src/Aspire.Hosting/Health/ResourceNotificationHealthCheckPublisher.cs index 6ac43ab79df..bb3ad6fc209 100644 --- a/src/Aspire.Hosting/Health/ResourceNotificationHealthCheckPublisher.cs +++ b/src/Aspire.Hosting/Health/ResourceNotificationHealthCheckPublisher.cs @@ -9,7 +9,7 @@ namespace Aspire.Hosting.Health; internal class ResourceNotificationHealthCheckPublisher(DistributedApplicationModel model, ResourceNotificationService resourceNotificationService, IDistributedApplicationEventing eventing, IServiceProvider services) : IHealthCheckPublisher { - private readonly List _alreadyHealthy = new(); + private readonly HashSet _alreadyHealthy = new(); public async Task PublishAsync(HealthReport report, CancellationToken cancellationToken) {