Skip to content

Fix to allow to retry of failed close calls on entities - #376

Open
Vijaya Gopal Yarramneni (yvgopal) wants to merge 2 commits into
Azure:master1.0from
yvgopal:close_failure_retry
Open

Fix to allow to retry of failed close calls on entities#376
Vijaya Gopal Yarramneni (yvgopal) wants to merge 2 commits into
Azure:master1.0from
yvgopal:close_failure_retry

Conversation

@yvgopal

Copy link
Copy Markdown
Member

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