Skip to content

Conversation

murgatroid99
Copy link
Member

This fixes #2681, according to manual testing. The goal is to ensure that the cancelled event is emitted after the finish event. First, in sendStatus, the notifyOnCancel call is moved to after actually sending the status. The most important part of that is moving it into the wantTrailers event handler, so that it is only called after the stream is flushed, but it also needs to be in the other branches in that function. In addition, the callback in the _final implementations is moved to before the sendStatus call to get the right ordering if there is a trailers-only response, which will be sent synchronously.

@murgatroid99 murgatroid99 merged commit 55b9852 into grpc:@grpc/[email protected] Mar 7, 2024
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.

2 participants