Skip to content

Commit

Permalink
More uniform "is null" check in common double-checked locking
Browse files Browse the repository at this point in the history
  • Loading branch information
jodydonetti committed Apr 20, 2024
1 parent 11f53f3 commit 2857b37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ZiggyCreatures.FusionCache/FusionCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ internal AutoRecoveryService AutoRecovery
{
lock (_autoRecoveryLock)
{
_autoRecovery ??= new AutoRecoveryService(this, _options, _logger);
if (_autoRecovery is null)
{
_autoRecovery = new AutoRecoveryService(this, _options, _logger);
}
}
}

Expand Down

0 comments on commit 2857b37

Please sign in to comment.