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] Updated: (HTTPCORE-117) bug in timeout disconnect with pending output
Date Sun, 30 Sep 2007 10:36:51 GMT

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

Oleg Kalnichevski updated HTTPCORE-117:

    Fix Version/s: 4.0-alpha6
         Assignee: Oleg Kalnichevski
         Priority: Major  (was: Minor)

> bug in timeout disconnect with pending output
> ---------------------------------------------
>                 Key: HTTPCORE-117
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-117
>             Project: HttpComponents Core
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 4.0-alpha5
>            Reporter: David Koski
>            Assignee: Oleg Kalnichevski
>             Fix For: 4.0-alpha6
> I ran into some trouble where I had a connection that was timing out but still had unsent
data.  This method gets called:
> org.apache.http.impl.nio.DefaultClientIOEventDispatch.timeout(IOSession)
> which calls these (in my case):
> org.apache.http.nio.protocol.BufferingHttpClientHandler.timeout(NHttpClientConnection)
> org.apache.http.impl.nio.NHttpConnectionBase.close()
> finally coming to close the connection itself:
>     public void close() throws IOException {
>         this.closed = true;
>         if (this.outbuf.hasData()) {
>             this.session.setEvent(EventMask.WRITE);
>         } else {
>             this.session.close();
>         }
>     }
> However, this.outbuf DID have data, so it just marked itself for writing.  The connection
was in no better shape, so after the connect timeout expired, it called this method again.
 And again.  There may be a good reason that it was done this way, but it looks like it causes
a problem.
> I am not sure what state the connection was in, but it looked like the connection was
established and NO data had been sent.  I noticed that the hasBufferedOutput flag was false,
though there was actually data to send.  That is set here:
>     public void produceOutput(final NHttpClientHandler handler) {
> ...
>         } finally {
>             // Finally set buffered output flag
>             this.hasBufferedOutput = this.outbuf.hasData();
>         }
> which suggests that this method was never called.  I can't say if that was a problem
in the client or the server (load balancer in this case) just wasn't handling any input.

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

View raw message