File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
src/Middleware/HealthChecks.EntityFrameworkCore/src Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 11// Licensed to the .NET Foundation under one or more agreements.
22// The .NET Foundation licenses this file to you under the MIT license.
33
4+ using System . Data . Common ;
45using Microsoft . EntityFrameworkCore ;
56using Microsoft . Extensions . Options ;
67
@@ -41,7 +42,7 @@ public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context
4142
4243 return new HealthCheckResult ( context . Registration . FailureStatus ) ;
4344 }
44- catch ( Exception exception )
45+ catch ( Exception exception ) when ( exception is not OperationCanceledException || ! cancellationToken . IsCancellationRequested )
4546 {
4647 return HealthCheckResult . Unhealthy ( exception . Message , exception ) ;
4748 }
You can’t perform that action at this time.
0 commit comments