question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't know what to write here really.

See original GitHub issue

Connection is closing before i write response to it.

First of all here is my GRPC-Java Client.

StreamObserver<Request> requestObserver = asyncStub.status(new StreamObserver<Reply>() {
...
Observer... on next on error on completed part here. }
...
try catches surrounded below in actuality.
requestObserver.onNext(newMessage(message));
requestObserver.onCompleted();

My GRPC-Node Server

call.on('data', () => { do_something(); console.log('Data'); call.write(something); })
call.on('end', () => { console.log('End'); call.end(); } )

I put System.out.println(“Completed”) on requestObserver’s onCompleted. So i get a message when it completes.

Then i put console.log() on node’s each call.on just before call.write and call.end

Problem is, connection is closing before the call.write(). I see End message first.

It seems like call.on(‘end’, ()) is working before call.on(‘data’, ())

😦 I didn’t understand anything.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tweenietomatoescommented, May 22, 2020

yes but documentation still would be helpful for those having brain inflamation like me.

1reaction
murgatroid99commented, May 22, 2020

Everything I said applies to built in Node streams in general, and how they interact with async functions. None of it is specific to gRPC.

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Things to Do If You Don't Know What to Write | by Itxy Lopez
The thing about writing is you don't need to have all of the answers. You can talk about how you're feeling, make a...
Read more >
When You Don't Know What to Write, Write About Your ...
The secret is to write about your insecurities, your fears, what you're embarrassed about, the things you wouldn't tell your mother. When you're...
Read more >
What to Write When You Don't Know What to Write - YouTube
Part THREE of a 3-Part Video Series on Creative Writing from the Author of THE BENEFITS OF BEING AN OCTOPUS. “What to Write...
Read more >
What to Write About When You Don't Know What to Write About
What to Write About When You Don't Know What to Write About · Write about your struggles · Write about your experiences ·...
Read more >
Don't Know What To Write About In Your Music? Here Are ...
1. Write a fictional story and develop characters · 2. Make music about your family · 3. Find something interesting in your daily...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found