hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HTTPCORE-240) DefaultConnectingIOReactor leaks socket descriptors if connections fail
Date Tue, 02 Nov 2010 14:12:27 GMT

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

Oleg Kalnichevski resolved HTTPCORE-240.
----------------------------------------

    Resolution: Fixed

Fixed in SVN trunk. 

Mohan, could you please to test your application against the latest snapshot of HttpCore and
confirm the fix?

Oleg 

> DefaultConnectingIOReactor leaks socket descriptors if connections fail
> -----------------------------------------------------------------------
>
>                 Key: HTTPCORE-240
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-240
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.0.1, 4.1-beta2
>            Reporter: Mohan Rao
>             Fix For: 4.1
>
>
> > We are using HttpCore 4.0.1 
> > 
> > Also in particular in DefaultConnectingIOReactor - 
> > 
> >  SocketChannel socketChannel; 
> >             try { 
> >                 socketChannel = SocketChannel.open(); 
> >                 socketChannel.configureBlocking(false); 
> >             } catch (IOException ex) { 
> >                 throw new IOReactorException("Failure opening socket", ex); 
> >             } 
> >             try { 
> >                 validateAddress(request.getLocalAddress()); 
> >                 validateAddress(request.getRemoteAddress()); 
> >                 
> >                 if (request.getLocalAddress() != null) { 
> >                     socketChannel.socket().bind(request.getLocalAddress()); 
> >                 } 
> >                 boolean connected = 
> > socketChannel.connect(request.getRemoteAddress()); 
> >                 if (connected) { 
> >                     prepareSocket(socketChannel.socket()); 
> >                     ChannelEntry entry = new ChannelEntry(socketChannel, 
> > request); 
> >                     addChannel(entry); 
> >                     return; 
> >                 } 
> >             } catch (IOException ex) { 
> >                 request.failed(ex); 
> >                 return; 
> >             } 
> > 
> > 
> > In the above code - should the socketChannel be closed before request.failed 
> > is called ? 
> > 
> « [hide part of quote]
> You are right. It should be but it is not. Please raise an issue in JIRA 
> for this defect. 
> Oleg 

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message