Skip to content
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

Merged
merged 1 commit into from Mar 11, 2024

Conversation

jansupol
Copy link
Contributor

No description provided.

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()) {
Copy link
Member

@jbescos jbescos Mar 7, 2024

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.

Copy link
Member

@jbescos jbescos left a 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.

@jansupol jansupol merged commit 9602806 into eclipse-ee4j:2.x Mar 11, 2024
3 checks passed
@jansupol jansupol deleted the future.cancel branch March 11, 2024 18:14
@senivam senivam added this to the 2.42 milestone Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants