hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lowe <chris.lowe...@gmail.com>
Subject Re: Simulate "Connection Reset" using HttpCore
Date Mon, 16 Feb 2009 12:36:11 GMT
Thanks Oleg, that worked well.

2009/2/15 Oleg Kalnichevski <olegk@apache.org>

> Chris Lowe wrote:
>
>> Hello,
>> I'd like to test some client logic that handles SocketException
>> "Connection
>> Reset" errors. Problem is, this can be an intermittent problem so testing
>> it
>> is proving difficult. Could anyone tell me if there is a way to force this
>> condition using HttpService?
>>
>> Cheers,
>>
>> Chris.
>>
>>
> Hi Chris
>
> You may want to try to set SO_LINGER socket option to zero as described
> here
>
>
> http://wiki.apache.org/HttpComponents/FrequentlyAskedConnectionManagementQuestions
>
> Google for more details on SO_LINGER and its use (abuse).
>
> Please also note you will most likely to subclass the default
> implementation of HttpConnection and override the behavior of #shutdown
> method or provide a custom method to abort connections.
>
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message