Skip to content

Commit

Permalink
Simplify disposal code
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelweave committed Feb 17, 2025
1 parent 3dd213e commit d762f39
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,12 +296,8 @@ public async ValueTask DisposeAsync()

try
{
_defaultCapabilitySemaphore.Dispose();
_metadataSemaphore.Dispose();
}
catch (NullReferenceException nex)
{
_logger.LogWarning(nex, "Null value encountered while disposing semaphores.");
_defaultCapabilitySemaphore?.Dispose();
_metadataSemaphore?.Dispose();
}
catch (Exception ex)
{
Expand Down

0 comments on commit d762f39

Please # to comment.