[ 
https://issues.apache.org/jira/browse/HTTPCORE-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski updated HTTPCORE-143:
---------------------------------------

    Affects Version/s:     (was: 4.0-rc1)
                       4.0-beta1
        Fix Version/s: 4.0-beta2

> 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). 

Here it is

http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/reactor/SessionRequestImpl.java?p2=%2Fhttpcomponents%2Fhttpcore%2Ftrunk%2Fmodule-nio%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhttp%2Fimpl%2Fnio%2Freactor%2FSessionRequestImpl.java&p1=%2Fhttpcomponents%2Fhttpcore%2Ftrunk%2Fmodule-nio%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhttp%2Fimpl%2Fnio%2Freactor%2FSessionRequestImpl.java&r1=613020&r2=613019&view=diff&pathrev=613020

> And even if it did, the fd would still be leaked unless you did a 
> key.channel().close(). 

Fair enough. I overlooked that.

Oleg

> 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-beta1
>            Reporter: Sandeep Tamhankar
>            Priority: Critical
>             Fix For: 4.0-beta2
>
>         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]

Reply via email to