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

Client callback not fired when provide async function #1763

Closed
koteesy opened this issue Apr 26, 2021 · 2 comments
Closed

Client callback not fired when provide async function #1763

koteesy opened this issue Apr 26, 2021 · 2 comments

Comments

@koteesy
Copy link

koteesy commented Apr 26, 2021

Problem description

Client callback and event on('data') not fired when provide async function callback to client method

Reproduction steps

For example, we have that call:

trackingService.parse(request, (err, response) => {
  console.log('Got response!');
});

This will print in our console Got response!

But if we add async declaration:

trackingService.parse(request, async (err, response) => {
  console.log('Got response!');
});

This cause infinite loading, and callback will never prints.

Environment

  • OS name: OSx 11.2.3 (Macbook air)
  • Node version: v14.16.0
  • Package name and version ["grpc": "^1.24.7"]
@murgatroid99
Copy link
Member

The grpc package has been deprecated. I don't know what causes this problem, and at this point I don't think we're going to put in work to fix it. We recommend using @grpc/grpc-js instead. Do you experience the same problem with that library?

@murgatroid99
Copy link
Member

It looks like the fix for this bug in grpc is in #1786, and the corresponding fix for @grpc/grpc-js is in #1787, which has been published in version 1.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants