revised strategy for http upload read timeout
This commit is contained in:
parent
a1fe8f1c87
commit
f67baab983
|
@ -161,7 +161,7 @@ public class HttpUploadConnection implements Transferable {
|
|||
try {
|
||||
wakeLock.acquire();
|
||||
final int expectedFileSize = (int) file.getExpectedSize();
|
||||
final int readTimeout = Math.max(Config.SOCKET_TIMEOUT,expectedFileSize / 2048); //assuming a minimum transfer speed of 16kbit/s
|
||||
final int readTimeout = (expectedFileSize / 2048) + Config.SOCKET_TIMEOUT; //assuming a minimum transfer speed of 16kbit/s
|
||||
Log.d(Config.LOGTAG, "uploading to " + mPutUrl.toString()+ " w/ read timeout of "+readTimeout+"s");
|
||||
if (mUseTor) {
|
||||
connection = (HttpURLConnection) mPutUrl.openConnection(mHttpConnectionManager.getProxy());
|
||||
|
|
Loading…
Reference in a new issue