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
Enable a way to Unregister Message Handler and Session Handler #14021
Enable a way to Unregister Message Handler and Session Handler #14021
Changes from 7 commits
8c46a41
db9b322
da77a24
5e1576a
61f0998
2988d02
d3faba2
4b921a6
78aff54
25f6b8d
d4a5589
ecd820b
cd8f044
fff0016
fae7bf1
642dc36
ffc4249
fbd31d0
f4dac4b
9692122
7741ad9
2bb96a5
c0ec74a
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.
I am not very comfortable with this potential infinite loop. Imagine OnMessage delegate never completes.then UnregisterMessageHandler never completes. This Unregister doesn't guarantee a clean close, but only a timed unregister. I mean it will wait for some time for all OnMessage delegates to finish, but there is no guarantee. We should ideally take some max timeout or some default timeout for the Unregister.
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.
It will be important to make this timeout configurable (and a default used if not specified). In Azure Functions, we provide a large amount of time for function execution to complete and need to provide the same amount of time while shutting down (this API will be invoked during shutdown)
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.
Suggest cancelling and disposing the runningTaskCancellationTokenSource here.
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.