sotimeout not working in a multipart http post on android 2.1
<p>I am using the apache httpclient that ships with the android sdk to upload a file on server using multipart http post. The problem is that when i turn off the wifi connection on my device and the device has no internet access and event after setting the sotimeout and connectiontimeout the code hangs on the <code>httpclient.execute()</code> statement indefinitely and it happens every single time.</p>

<p>my code is:</p>

<pre><code>HttpClient httpclient = new DefaultHttpClient();

HttpConnectionParams.setSoTimeout(httpclient.getParams(), 5000);
ConnManagerParams.setTimeout( httpclient.getParams(), 5000 ); 

HttpConnectionParams.setSocketBufferSize(httpclient.getParams(), 8192);

HttpPost("http://myurl");

File file = new File(fileAbsolutePath);
MultipartEntity mpEntity = new MultipartEntity();
ContentBody cbFile = new FileBody(file);
mpEntity.addPart("uploadedfile", cbFile);
httppost.setEntity(mpEntity);
if(!backupCancel)
{
    System.out.println("&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;Actually transferring file&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;");
    HttpResponse response = httpclient.execute(httppost);
}
</code></pre>
