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
[Event Hubs] Update send operation to include initialization #4319
[Event Hubs] Update send operation to include initialization #4319
Changes from all commits
260b0e6
c74f5e4
00016cb
4916ce3
af5d8c4
a66272a
a74824d
1607ddd
0631ceb
60fa5ae
3168339
b449cef
e0c8e92
85c2ffc
1212ae7
f28c566
66127ee
0e54d61
3ec9c9d
d9d38a3
f85e112
f5b54eb
ddb6195
6e6ef92
eaaf17e
78c0b4a
f6e7271
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.
Due to the re-arrangement of the timer, if
if (abortSignal && abortSignal.aborted)
below returns true, then we end up returning a rejected promise (which is right) without clearing the timer.Please consider keeping the previous order of the callbacks/helper-functions and only adding the link creation part at the right place
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 ordering in the recent commit of eaaf17e is better, but still needs work.
In the current setup, if the abort signal is fired when the async process of
init()
is in progress, then the promise is being rejected only afterinit()
is complete. This is becauseinit()
is being called before the event handler forabort
event was added.Please make the below changes
init()
failsThere 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.
#4322 (comment) thread specifically clarifies about abort during init().
This scenario if we want to address would then need to apply for the managementRequest as well correct? Or did we specifically exclude this because of complexity involved? (In not having access to removeListeners() on sender link from the SDK?) It just feels like UX is not consistent in both cases.
Okay to implement the optimization and new corner cases from this.
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.
This scenario applies to managementRequest as well i.e. the scenario of abort signal being fired when the async process of init() is in progress.
I have updated the comment thread for managementRequest. Please see https://github.com/Azure/azure-sdk-for-js/pull/4322/files#r305599979