Skip to content
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

Fixing disposition hanging if the link is closed #171

Merged

Conversation

richardpark-msft
Copy link
Member

Disposition of a message would hang if the link was closed prior to the settlement function being called.

The problem is that we don't do a link check to see if our link is valid anymore, which can lead to:

  1. Receive message
  2. Link is detached
  3. Settle message

For message settlement all the traffic happens through the session and connection, not necessarily the link, which means that if the link is detached or dead we have a disposition that has a channel that we never close, resulting in a hang.

Fixes #126

@richardpark-msft richardpark-msft merged commit ca68952 into Azure:main Jul 5, 2022
@richardpark-msft richardpark-msft deleted the amqp-fix-accept-on-closed-link branch July 5, 2022 21:46
richardpark-msft pushed a commit to richardpark-msft/azure-sdk-for-go that referenced this pull request Jul 5, 2022
richardpark-msft added a commit to Azure/azure-sdk-for-go that referenced this pull request Jul 5, 2022
Applying patch from Azure/go-amqp#171

The disposition functions, which we use for message settlement, can hang if the link is closed. The issue here is message disposition's initial send is done through the session and connection, which means a dead link won't be detected. 

When this happens we end up blocking on a channel that won't be closed since the disposition response will never come back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Accepting disposition hangs if the link is close()d
2 participants