grpc-caller icon indicating copy to clipboard operation
grpc-caller copied to clipboard

Cannot create twice a client that uses stream

Open manu-st opened this issue 7 years ago • 2 comments

I have some code which is using the static way to promisify the gRPC calls. However if I do them twice in a raw the second time, the streaming APIs don't work. After debugging I found that the grpc Client object is being modified in such a way that it drops some of the fields of the original service object.

Simply try:

const services = require('./static/helloworld_grpc_pb');
var client = caller('localhost:50051', services.GreeterClient); // Client works for both normal and streaming gRPC calls.
client = caller('localhost:50051', services.GreeterClient);yar     // Client works for normal gRPC calls but not for streaming.

Where GreeterClient has some APIs using streams.

manu-st avatar Dec 22 '17 22:12 manu-st

Having this issue as well.

nunofgs avatar Jan 12 '18 14:01 nunofgs

Hello, can you please provide a reproducible code example. Additionally can you try the req_res branch of #11 and see if the problem still persists. Note that now you have to explicitly add grpc dependency in your package.json. Thanks!

bojand avatar Apr 28 '18 18:04 bojand