Skip to content

grpc-js: Don't initiate a read after receiving a message #1479

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

Merged
merged 5 commits into from
Jun 17, 2020

Conversation

murgatroid99
Copy link
Member

It turns out that the Readable stream class will aggressively call _read even if push returns true, so we don't also need to start another read after pushing. This fixes #1473, at least according to the test case provided in that issue.

@murgatroid99 murgatroid99 merged commit 3f7fb47 into grpc:master Jun 17, 2020
@@ -51,7 +51,7 @@ function echoMetadataGenerator(options, callback) {

const credentials = grpc.credentials.createFromMetadataGenerator(echoMetadataGenerator);

describe(`${anyGrpc.clientName} client -> ${anyGrpc.serverName} server`, function() {
describe.only(`${anyGrpc.clientName} client -> ${anyGrpc.serverName} server`, function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this only intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it is not. I left that in there from when I was fixing the test. Thanks for catching it.

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.

@grpc/grpc-js: Data loss on server-side streaming call (and a possible solution)
3 participants