[
https://issues.apache.org/jira/browse/HTTPCORE-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564963#action_12564963
]
Sandeep Tamhankar commented on HTTPCORE-143:
--------------------------------------------
I just took a look at the 4.0-beta-1 source code, and I didn't notice a fix for
HTTPCORE-141 in it (e.g. do a key.cancel() after timing out the connection).
And even if it did, the fd would still be leaked unless you did a
key.channel().close().
To answer Roland's question -- the callback doesn't have access to the
SelectionKey, so it can't close the SocketChannel.
I'll try looking at the latest svn snapshot in a bit -- in the middle of some
other unrelated P1 issues in my own code right now. :)
> Connection timeout leaks socket fd
> ----------------------------------
>
> Key: HTTPCORE-143
> URL: https://issues.apache.org/jira/browse/HTTPCORE-143
> Project: HttpComponents Core
> Issue Type: Bug
> Components: HttpCore NIO
> Affects Versions: 4.0-rc1
> Reporter: Sandeep Tamhankar
> Priority: Critical
> Attachments: DefaultConnectingIOReactor.java.diff
>
>
> Seen in an alpha7 snapshot: svn-597902
> Scenario:
> * I want to talk to a machine that has a firewall configured that drops
> inbound packets on some port: iptables -I INPUT -p tcp --dport 8787 -j DROP
> * I set up a client that uses NIO to open a connection to that host:port,
> with some timeout.
> Expected Result:
> The connection should timeout and the fd should be closed.
> Actual Result:
> My timeout callback gets called, but the connection never gets closed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]