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 to allow to retry of failed close calls on entities #376

Open
wants to merge 2 commits into
base: master1.0
Choose a base branch
from

Conversation

yvgopal
Copy link
Member

@yvgopal yvgopal commented Jul 19, 2019

Fixes part 1 of #366
If for any reason, close call on a sender or receiver or messaging factory fails, the state of the object remains 'closing=true' and calling close again will simply return. This fix resets the closing flag to false if close fails, so client application can call close again. of course, calling close again doesn't guarantee that it succeeds. Even if close repeatedly fails, state of the objects will not be stuck in 'closing=true' state.

Another thing to handle concurrent or simultaneous close calls. If one threads called close and is waiting for close to finish, any other threads that call close will return immediately indicating the entity is closed. It is semantically wrong. This fix also addresses it.

Added tests to confirm it's behaving right.

… flag so close can be attempted again. Concurrent close calls shouldn't while close is still in progress
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.

3 participants