Skip to content

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.

yvgopal added 2 commits July 18, 2019 18:03
… 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