Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[service-bus] Make close() work when a connection is in process #8746
[service-bus] Make close() work when a connection is in process #8746
Changes from 2 commits
6d17e13
203a90d
741cb63
0d3198a
0d1c8fe
fb7b198
923fcef
3330f4a
5933c14
93dc121
65a569e
8c93c1f
ebb33e7
8fc9bae
2f0ca7f
bffee98
052f576
5b63368
75b2325
f37aa0c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The
isConnecting
property gets checked in multiple places to make the decision of whether to callonDetached()
or not so that there are not multiple attempts being made at recovering the link.With the change in this PR,
isConnecting
is now being set to true only after the lock is acquired, resulting in potential multiple calls toonDetached
now being a possibility.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.
Though recently in #8401, @chradek did add a new
_isDetaching
flag to ensure thatonDetached()
is a no-op if it gets called multiple times..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.
But multiple calls to
onDetached()
will add to the noise in the logsSo, I would recommend moving the
this.isConnecting = true
to before the lock is acquiredThere 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.
I'll take a deeper look at this. Your comments have me realize I need to consider the onDetached/open/close in tandem and I don't think I've done that enough.