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

Oleg Kalnichevski updated HTTPCORE-49:
--------------------------------------

    Attachment: connect.patch

Asankha,
UnresolvedAddressException appears the only legitimate runtime exception that 
can be thrown in this case. I feel a little uneasy about indiscriminately 
catching all unchecked exceptions because most of them represent fatal 
programming errors and should be treated as such. Would this be an acceptable 
solution to the problem (see the patch attached)?

Oleg 

> DefaultConnectingIOReactor does not properly handle failures
> ------------------------------------------------------------
>
>                 Key: HTTPCORE-49
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-49
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>            Reporter: Asankha C. Perera
>         Assigned To: Oleg Kalnichevski
>            Priority: Critical
>             Fix For: 4.0-alpha4
>
>         Attachments: connect.patch
>
>
> The DefaultConnectingIOReactor uses SocketChannel.connect() which could throw 
> a runtime exception such as an UnresolvedAddressException, that does not get 
> handled
> try {
>                 if (request.getLocalAddress() != null) {
>                     socketChannel.socket().bind(request.getLocalAddress());
>                 }
>                 socketChannel.connect(request.getRemoteAddress());
>             } catch (IOException ex) {
>                 request.failed(ex);
>             }

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