Provide a way to cancel client request.
See original GitHub issueWe have ClientRequestContext.timeoutNow() to trigger timeout immediately.
Similarly, it might be good to add ClientRequestContext.cancel() which cancels the current client request in case a user cannot easily cancel or abort the response such as https://github.com/line/centraldogma/blob/master/client/java/src/main/java/com/linecorp/centraldogma/internal/client/AbstractWatcher.java#L224
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
How to Cancel a Meeting Without Upsetting Your Client
Especially if you're the requesting party and need to cancel, it's courteous to apologize. Instead of sending an email or text message, give...
Read more >How To Cancel A Client Meeting Without Sounding Rude
1. Turn The Meeting Into A Phone Call · 2. Turn The Meeting Into A Shorter Meeting · 3. Turn The Meeting Into...
Read more >How to Cancel a Meeting Without Upsetting Your Client ... - Indy
Be clear about the reason for the cancellation. Let your client know what happened and why it was necessary. This way, they won't...
Read more >Here's how successful people cancel meetings, Stanford ...
The right way to 'cancel' · 1. Respond to invitations promptly by clicking “accept,” “decline” or “tentative.” · 2. Notify attendees at least...
Read more >How to Respond to a Cancellation Requests + Email Templates
Want to save hours of repetitive typing? Try Text Blaze, it's free! Ask why they decided to cancel, how your company can (or...
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 Free
Top 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

If ctx is canceled after the request is fully sent (i.e waiting to get a response fully), the response is never canceled. So I think we should use a different approach.
I’m not sure if we can rename
TimeoutSchedulerto something else and generalize for this purpose (cancel or timeoutNow which just abort the response with the different exception), but it’s worth trying. What I meant was that we should do the same approach asTimeoutSchedulerdoes. (It maintains the state of a request and cancel it if necessary.)Thanks, @tumile for your interest. I think it’s rather going to work exactly as
ClientRequestContext.timeoutNow()does except raisingCancellationExceptioninstead ofResponseTimeoutException. 😄