Skip to content

Commit 855b7f0

Browse files
committed
RavenDBHealthCheck: prevent health check from disposing shared client certificate.
1 parent 846fbc9 commit 855b7f0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/HealthChecks.RavenDB/RavenDBHealthCheck.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context
4949
Certificate = o.Certificate
5050
};
5151

52+
// Health check doesn't own the certificate lifetime; it may be shared (e.g. DI/KeyVault).
53+
// Disposing it can break other RavenDB stores in the process.
54+
store.Conventions.DisposeCertificate = false;
55+
5256
try
5357
{
5458
store.Initialize();

0 commit comments

Comments
 (0)