Hi Roland,

Thanks for the response.

I have tried the following code.

HttpClient httpclient = new HttpClient(connManager);
HttpClientParams clientParams = new HttpClientParams();
clientParams.setSoTimeout(1);
//clientParams.setConnectionManagerTimeout(1);
httpclient.setParams(clientParams);

When I am using clientParams.setSoTimeout(1); I am getting 
java.net.SocketTimeoutException: Read timed out error.

I think it is not same as ConnectTimeoutException.

Also I have tried clientParams.setConnectionManagerTimeout(1);But in this case 
no exception occurred.

Could you please give me more detail how to implement Connection TimeOut 
feature.

Regards,
Lalit 

-----Original Message-----
From: Roland Weber [mailto:[EMAIL PROTECTED]
Sent: Friday, December 08, 2006 12:04 AM
To: HttpClient User Discussion
Subject: Re: How to test Connection timeout


Hello Lalit,

> I have used following code fragment in our implementation:
> 
> HttpConnectionManagerParams connParams = connManager.getParams();
> connParams.setConnectionTimeout(1);
> 
> But there is no time out happening.

Have you tried setting the timeout value at the method
or client parameters rather than at the connection manager?

hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to