-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SemaphoreSlim release logic (#941)
Under some circumstances, SemaphoreSlim.WaitAsync() can fail, e.g. throwing an OperationCanceledException. In these cases, the internal semaphore counter didn't change, so SemaphoreSlim.Release() should not be called, to avoid exceptions. Classes affected: - SqlServerMemory (initialization) - SimpleQueue (message dispatching)
- Loading branch information
Showing
2 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters