-
-
Notifications
You must be signed in to change notification settings - Fork 723
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
notify observer to complete async stream #5008
Conversation
Very cool, thanks for the contribution :) Can you add one test case in the integration tests to test this behaviour? You can add a test case to And then just type out a test case like |
No problem, but I need some time. |
In addition, this pull request can only let the client detect the subscription that ends normally. If the socket is closed due to server crash or network error, the client cannot receive the message of completing the subscription, so this notification will not be triggered. If you want to complete the subscription in this case, you may need to modify the interface definition. Because my interim solution needs to access non-public members through reflection to trigger the notification of subscription completion. If you can accept it, I am willing to initiate another pull request to solve this problem. |
@PascalSenn integration test has added. |
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.
Looks good to me... thanks for your help!
@PascalSenn I will patch this into 12.9 so let's keep it open for now... I will merge it on the weekend. |
OK ... we now have a green main ... so lets see if this build is green. |
/AzurePipelines run |
Azure Pipelines successfully started running 3 pipeline(s). |
/AzurePipelines run |
Azure Pipelines successfully started running 3 pipeline(s). |
/AzurePipelines run |
Azure Pipelines successfully started running 3 pipeline(s). |
SonarCloud Quality Gate failed. |
notify observer to complete async stream.
IObservable{T}
toIAsyncEnumerable
and useawait foreach
to enumerate stream, but observers never callOnCompleted
, the thread will be permanently blocked.see also #5006 .