Android: AndroidHttpClient - how to set timeout?
I have followed the instructions of [kuester2000's answer][1], but my timeout settings don't seem to work.

    try
    {
    	int timeout = 3000;
        URL myURL = //some valid URL
    	
    	AndroidHttpClient = AndroidHttpClient.newInstance("name");
        HttpGet httpGet = new HttpGet(myURL.toExternalForm());
    
    	HttpParams httpParams = new BasicHttpParams();
    	HttpConnectionParams.setConnectionTimeout(httpParams, timeout);
    	HttpConnectionParams.setSoTimeout(httpParams, timeout);
    	
    	HttpResponse response = httpClient.execute(httpGet);
    	
    	//...
    }
    catch (SocketTimeoutException e)
    {
    	e.printStackTrace();
    }
    catch (ConnectTimeoutException e)
    {
    	e.printStackTrace();
    }
    catch (IOException e)
    {
    	e.printStackTrace();
    }
    //...

However, the timeout value doesn't change anything.

In the answer I linked, it also says:

> The connection timeout throws "java.net.SocketTimeoutException: Socket is not connected" and the socket timeout "java.net.SocketTimeoutException: The operation timed out".

But I get neither. Instead I get "org.apache.http.conn.ConnectTimeoutException: Connect to ... timed out"

so can anybody help me? where is the mistake?

  [1]: http://stackoverflow.com/questions/693997/how-to-set-httpresponse-timeout-for-android-in-java

Android: AndroidHttpClient - how to set timeout?
===

I have followed the instructions of [kuester2000's answer][1], but my timeout settings don't seem to work.

    try
    {
    	int timeout = 3000;
        URL myURL = //some valid URL
    	
    	AndroidHttpClient = AndroidHttpClient.newInstance("name");
        HttpGet httpGet = new HttpGet(myURL.toExternalForm());
    
    	HttpParams httpParams = new BasicHttpParams();
    	HttpConnectionParams.setConnectionTimeout(httpParams, timeout);
    	HttpConnectionParams.setSoTimeout(httpParams, timeout);
    	
    	HttpResponse response = httpClient.execute(httpGet);
    	
    	//...
    }
    catch (SocketTimeoutException e)
    {
    	e.printStackTrace();
    }
    catch (ConnectTimeoutException e)
    {
    	e.printStackTrace();
    }
    catch (IOException e)
    {
    	e.printStackTrace();
    }
    //...

However, the timeout value doesn't change anything.

In the answer I linked, it also says:

> The connection timeout throws "java.net.SocketTimeoutException: Socket is not connected" and the socket timeout "java.net.SocketTimeoutException: The operation timed out".

But I get neither. Instead I get "org.apache.http.conn.ConnectTimeoutException: Connect to ... timed out"

so can anybody help me? where is the mistake?

  [1]: http://stackoverflow.com/questions/693997/how-to-set-httpresponse-timeout-for-android-in-java
