New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagate Future.cancel() to connectors #5542
Conversation
Signed-off-by: jansupol <jan.supol@oracle.com>
@@ -157,6 +158,10 @@ protected void notifyResponse() { | |||
|
|||
@Override | |||
public void channelRead0(ChannelHandlerContext ctx, HttpObject msg) { | |||
if (jerseyRequest.isCancelled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Netty javadoc does not provide much details about how often is this method invoked:
https://netty.io/4.0/api/io/netty/channel/SimpleChannelInboundHandler.html
Keep in mind that if this method is invoked once a response is completed, the future will be cancelled, but you will have to wait for the whole time till the response comes, which does not make much sense because the idea of cancelling is to stop execution immediately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I am not sure whether cancelling the request will happen immediately.
No description provided.