You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Asankha C. Perera" <as...@apache.org> on 2014/08/27 18:39:55 UTC
Separating Connection Timeouts from Socket Timeouts
Hi All
The HttpAsyncRequestExecutor.timeout() method triggers a failed(new
SocketTimeoutException()) on the FutureCallback while the
RouteSpecificPool.timeout() also triggers the same.
Hence from within the FutureCallback we cannot distinguish if the cause
is a Connection timeout or a Socket timeout. Should we change the
RouteSpecificPool.timeout() to trigger a failed(new
java.net.ConnectException()) instead?
thanks
asankha
--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org
http://esbmagic.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: Separating Connection Timeouts from Socket Timeouts
Posted by "Asankha C. Perera" <as...@apache.org>.
On 08/27/2014 10:43 PM, Oleg Kalnichevski wrote:
> On Wed, 2014-08-27 at 22:09 +0530, Asankha C. Perera wrote:
>> Hi All
>>
>> The HttpAsyncRequestExecutor.timeout() method triggers a failed(new
>> SocketTimeoutException()) on the FutureCallback while the
>> RouteSpecificPool.timeout() also triggers the same.
>>
>> Hence from within the FutureCallback we cannot distinguish if the cause
>> is a Connection timeout or a Socket timeout. Should we change the
>> RouteSpecificPool.timeout() to trigger a failed(new
>> java.net.ConnectException()) instead?
>>
> +1
> Makes sense to me.
>
> Oleg
Thanks Oleg, I will update the code accordingly
regards
asankha
--
Asankha C. Perera
AdroitLogic, http://adroitlogic.org
http://esbmagic.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
Re: Separating Connection Timeouts from Socket Timeouts
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2014-08-27 at 22:09 +0530, Asankha C. Perera wrote:
> Hi All
>
> The HttpAsyncRequestExecutor.timeout() method triggers a failed(new
> SocketTimeoutException()) on the FutureCallback while the
> RouteSpecificPool.timeout() also triggers the same.
>
> Hence from within the FutureCallback we cannot distinguish if the cause
> is a Connection timeout or a Socket timeout. Should we change the
> RouteSpecificPool.timeout() to trigger a failed(new
> java.net.ConnectException()) instead?
>
+1
Makes sense to me.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org