Client cancellations aren't propagated to the server
See original GitHub issueWhen 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:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.