aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-09-27 22:11:09 +0200
committerChristian Schneppe <christian@pix-art.de>2016-09-27 22:11:09 +0200
commit84a57e570683fde500a352495712df108c91a9da (patch)
tree0a307c6ea5c2abe6a0f6846003eee4f29d2c5630 /src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
parentdb224342ec1c1bf9da989f8f3d083a6941867a3b (diff)
increase ReadTimeouts for HTTP connections
and remove the automatic upload retry
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
index 9a6676154..376ddb0cb 100644
--- a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
+++ b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
@@ -221,7 +221,7 @@ public class HttpDownloadConnection implements Transferable {
mHttpConnectionManager.setupTrustManager((HttpsURLConnection) connection, interactive);
}
connection.setConnectTimeout(Config.SOCKET_TIMEOUT * 1000);
- connection.setReadTimeout(Config.SOCKET_TIMEOUT * 1000);
+ connection.setReadTimeout(Config.CONNECT_TIMEOUT * 1000);
connection.connect();
String contentLength = connection.getHeaderField("Content-Length");
connection.disconnect();
@@ -291,7 +291,7 @@ public class HttpDownloadConnection implements Transferable {
connection.setRequestProperty("Range", "bytes="+size+"-");
}
connection.setConnectTimeout(Config.SOCKET_TIMEOUT * 1000);
- connection.setReadTimeout(Config.SOCKET_TIMEOUT * 1000);
+ connection.setReadTimeout(Config.CONNECT_TIMEOUT * 1000);
connection.connect();
is = new BufferedInputStream(connection.getInputStream());
boolean serverResumed = "bytes".equals(connection.getHeaderField("Accept-Ranges"));