New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(iot-dev): Fix AMQP layer not releasing a semaphore for method links after unsubscribing from methods #1831
Merged
Conversation
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
…ks after unsubscribing from methods This semaphore was just never released in this method
timtay-microsoft
requested review from
abhipsaMisra,
azabbasi,
barustum,
bikamani,
drwill-ms,
jamdavi and
vinagesh
as code owners
March 12, 2021 19:43
@@ -619,6 +619,7 @@ public async Task DisableMethodsAsync(TimeSpan timeout) | |||
finally | |||
{ | |||
Logging.Exit(this, timeout, nameof(DisableMethodsAsync)); | |||
_methodLinkSemaphore.Release(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll want to expand the view to see the whole method here. At line 593, this semaphore is grabbed. After that, the try block does some logic that may or may not throw an exception, so this finally block is the perfect place to release the semaphore
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
abhipsaMisra
approved these changes
Mar 12, 2021
abhipsaMisra
pushed a commit
that referenced
this pull request
Mar 19, 2021
…ks after unsubscribing from methods (#1831) This semaphore was just never released in this method
vinagesh
pushed a commit
that referenced
this pull request
Mar 22, 2021
…ks after unsubscribing from methods (#1831) This semaphore was just never released in this method
vipeller
pushed a commit
to vipeller/azure-iot-sdk-csharp
that referenced
this pull request
Mar 25, 2021
…ks after unsubscribing from methods (Azure#1831) This semaphore was just never released in this method (cherry picked from commit c3c15fe)
vipeller
pushed a commit
to vipeller/azure-iot-sdk-csharp
that referenced
this pull request
Mar 25, 2021
…ks after unsubscribing from methods (Azure#1831) This semaphore was just never released in this method (cherry picked from commit c3c15fe)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This semaphore was just never released in this method
#1822 for additional context