-
Notifications
You must be signed in to change notification settings - Fork 140
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 deadlock on DeferredConfirmations #47
Conversation
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.
Hi thanks for your PR,
it looks good to me but in the integration test the PublishWithDeferredConfirm should publish to a non existent exchange in order to let Wait to return a false ack.
Can you replace line 1829 of integration_test.go to publish to a non existent exchange?
It passed for both scenarios interestingly enough. Updated it anyway to publish to an exchange that does not exist |
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.
Thank you!
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.
Looks good! Approved!
This PR improves the changes proposed in #44 originally made by @shifengbin
Changes:
Wait()
and other internal methodsdeferredConfirmations.Close()
.Wait()
will returnack: false
when connection is closed (as suggested by @DanielePalaia )The newly added unit & integration tests both passed consistently when I ran them
This problem is also mentioned in #46