Svn?

Gary

On Fri, Aug 23, 2019, 07:07 <[email protected]> wrote:

> Author: olegk
> Date: Fri Aug 23 11:07:41 2019
> New Revision: 1865743
>
> URL: http://svn.apache.org/viewvc?rev=1865743&view=rev
> Log:
> Bug fix: PipeliningClientExchangeHandlerImpl to fail result future in case
> of an execution failure
>
> Modified:
>
> httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java
>
> Modified:
> httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java
> URL:
> http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java?rev=1865743&r1=1865742&r2=1865743&view=diff
>
> ==============================================================================
> ---
> httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java
> (original)
> +++
> httpcomponents/httpasyncclient/branches/4.1.x/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/PipeliningClientExchangeHandlerImpl.java
> Fri Aug 23 11:07:41 2019
> @@ -145,16 +145,20 @@ class PipeliningClientExchangeHandlerImp
>
>      @Override
>      void executionFailed(final Exception ex) {
> -        final HttpAsyncRequestProducer requestProducer =
> this.requestProducerRef.get();
> -        if (requestProducer != null) {
> -            requestProducer.failed(ex);
> -        }
> -        final HttpAsyncResponseConsumer<T> responseConsumer =
> this.responseConsumerRef.get();
> -        if (responseConsumer != null) {
> -            responseConsumer.failed(ex);
> -        }
> -        for (final HttpAsyncResponseConsumer<T> cancellable:
> this.responseConsumerQueue) {
> -            cancellable.cancel();
> +        try {
> +            final HttpAsyncRequestProducer requestProducer =
> this.requestProducerRef.get();
> +            if (requestProducer != null) {
> +                requestProducer.failed(ex);
> +            }
> +            final HttpAsyncResponseConsumer<T> responseConsumer =
> this.responseConsumerRef.get();
> +            if (responseConsumer != null) {
> +                responseConsumer.failed(ex);
> +            }
> +            for (final HttpAsyncResponseConsumer<T> cancellable:
> this.responseConsumerQueue) {
> +                cancellable.cancel();
> +            }
> +        } finally {
> +            this.resultFuture.failed(ex);
>          }
>      }
>
>
>
>

Reply via email to