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.

Client cancellations aren't propagated to the server

See original GitHub issue

When I close a streaming client request with an exception I would expect the corresponding server receive channel to throw an exception upon calling receive (or iterating the channel) but it doesn’t seem to do so - am I doing something wrong?

Client:

call.requestChannel.close(Exception("Testing Exception"))

Server:

try {
    for (request in requestChannel) {
        logger.info("Iterating")
    }
    logger.info("Closed normally")
} catch (e: Exception){
    logger.error("Caught exception", e)
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
marcoferrercommented, Dec 12, 2019

I can confirm this is a bug. I think it was introduced when outbound flow control was reworked. It is actually addressed in the streaming machinery rewrite that is currently in progress. Since that rewrite is still in alpha stages, I’ll get a fix out for this bug in the very next release. The release is expected to occur on this up coming Monday. Ill get a PR opened tonight and tag you for visibility.

1reaction
jebbenchcommented, Dec 12, 2019

Hi Marco - thanks for the response (and the library).

I’ve replicated the issue I’m seeing in this repo: https://github.com/jebbench/kotlin-coroutines-gRPC-template

If you need anything else let me know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reliable gRPC services with deadlines and cancellation
Propagate the cancellation token to child calls. Propagating the cancellation token ensures that child calls are canceled with their parent. ...
Read more >
Cancel signal not fully propagated to the ReactorNettyClient ...
Cancel signal not fully propagated to the ReactorNettyClient. ... can easily cancel the "next" command that was already sent to the server.
Read more >
Context without cancel propagation - Stack Overflow
Say I have an http request and its context is canceled after the response is returned to a client and I need to...
Read more >
I changed DNS settings, but they haven't taken effect
If you changed DNS settings, here are some common reasons that the changes haven't taken effect yet.
Read more >
5 Handling Events - Oracle Help Center
For more information, see Section 5.3.3, "How to Use Client-Side Attributes for an Event." Cancel propagation to the server. Some of the components...
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