You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2014/03/07 10:39:45 UTC

[jira] [Resolved] (HTTPASYNC-70) Shuting down the underlying channel [ioctrl.shutdown()] doesn't mark contentdecoder as completed

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

Oleg Kalnichevski resolved HTTPASYNC-70.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0.2

This is a duplicate of HTTPASYNC-69. 

A full resolution of this problem depends on a fix to HttpCore currently available in snapshots only (to be included in the next GA release) For the time being instead of calling IOCtrl#shutdown simply throw an I/O or a runtime exception.

Oleg

> 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
>              Labels: async, httpasynconsumer
>             Fix For: 4.0.2
>
>
> 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