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: [email protected]
For additional commands, e-mail: [email protected]