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

Fix example client to avoid deadlock in Close #123

Merged
merged 2 commits into from
Oct 1, 2022
Merged

Fix example client to avoid deadlock in Close #123

merged 2 commits into from
Oct 1, 2022

Conversation

Zerpet
Copy link
Contributor

@Zerpet Zerpet commented Sep 30, 2022

The example was "giving up" on publish confirmation after the
resendDelay. This is not correct because the library will keep track of
this confirmation, and it will try to deliver the confirmation. By
giving up, we are may leave confirmations un-received in the
confirmation channel, which will cause a deadlock during the shut down
sequence in Channel.Close.

We should not give up on the confirmation and simply wait.

Fixes #122

The example was "giving up" on publish confirmation after the
resendDelay. This is not correct because the library will keep track of
this confirmation, and it will try to deliver the confirmation. By
giving up, we are may leave confirmations un-received in the
confirmation channel, which will cause a deadlock during the shut down
sequence in Channel.Close.

We should not give up on the confirmation and simply wait.

Signed-off-by: Aitor Pérez Cedres <acedres@vmware.com>
@Zerpet Zerpet self-assigned this Sep 30, 2022
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.

Example client can deadlock in Close due to unconsumed confirmations
3 participants