hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "clajder (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPASYNC-70) Shuting down the underlying channel [ioctrl.shutdown()] doesn't mark contentdecoder as completed
Date Fri, 07 Mar 2014 08:24:42 GMT
clajder created HTTPASYNC-70:
--------------------------------

             Summary: Shuting down the underlying channel [ioctrl.shutdown()] doesn't mark
contentdecoder as completed
                 Key: HTTPASYNC-70
                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-70
             Project: HttpComponents HttpAsyncClient
          Issue Type: Bug
    Affects Versions: 4.0.1
            Reporter: clajder


If in AsyncByteConsumer close underlying channel

protected void onByteReceived(ByteBuffer buf, IOControl ioctrl) throws IOException {
			if( <some_condition> )
                         {
			        ioctrl.shutdown();
			 }
		}
later in HttpAsyncRequestExecutor.inputReady(...) there is just one check agains content decoder
to verify if consuming completed 

        if (decoder.isCompleted()) {
            processResponse(conn, state, handler);
        }

so the decoder goes into indefinite waiting.

Seems like setting decoder.completed into true solves problem.

Thoughts?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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


Mime
View raw message