Skip to content
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

grpc-js: Fix client hang when receiving extra messages for a unary response #2772

Conversation

murgatroid99
Copy link
Member

The new call.startRead() call is the fix for the main bug. Previously the I also changed the client to use the UNIMPLEMENTED status code for cardinality violations to make it consistent with the server, and because that is what the spec actually says.

This fixes #2768.

@murgatroid99 murgatroid99 merged commit 52fe8e9 into grpc:@grpc/[email protected] Jun 18, 2024
4 of 5 checks passed
@ejona86
Copy link
Member

ejona86 commented Jun 24, 2024

We should not use UNIMPLEMENTED. It is very bad if it ever gets triggered. Please swap back to INTERNAL. We will change the spec.

@murgatroid99
Copy link
Member Author

Is it really that bad? I would say that if a server responds with multiple messages to a method that the client believes is unary or client streaming, the server doesn't implement the method the client is intends to access.

In any case, as long as this is what the spec says, I consider it to be correct behavior. If and when the spec changes, I'll make the change here too. But as far as I know Python and C++ also have this behavior, so it is consistent with (some) other languages.

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.

None yet

4 participants