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-379) HttpAsyncService.exception(...) should shutdown connection on IOException
Date Mon, 28 Apr 2014 13:17:14 GMT

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

Oleg Kalnichevski resolved HTTPCORE-379.

       Resolution: Fixed
    Fix Version/s: 4.4-alpha1

In fact in this particular case the connection should be shut down, not closed, regardless
of the exception type given that the actual message exchange cannot be correctly completed.

Patch committed to both SVN trunk and 4.3.x. Please review / re-test.


> HttpAsyncService.exception(...) should shutdown connection on IOException
> -------------------------------------------------------------------------
>                 Key: HTTPCORE-379
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-379
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.3.2
>            Reporter: Dmitry Potapov
>            Priority: Minor
>             Fix For: 4.3.3, 4.4-alpha1
>         Attachments: NHttpServer.java, shutdown-on-IOException.patch
> Currently, HttpAsyncService.exception(...) closes connection if response is already submitted.
On TCP RST packet received all futher attempts to write into socket will result in IOException,
but SelectionKey.readyOps() won't be changed. So, if connection output buffer has some unsent
data, BaseIOReactor.writable() will be called again and again, but no data will be written,
so reactor thread will stuck.
> I suggest to shutdown connection if IOException occured, this will save from infinite
calls to BaseIOReactor.writable()

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message