aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2016-03-17 22:14:49 +0100
committerlookshe <github@lookshe.org>2016-03-17 22:14:49 +0100
commitcb55d2af52c1007b577b1bb1f94a4206aec58ef0 (patch)
tree1fb23a1937d38100876d1eb69c4d5566f394ec1a /src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java
parent0de9c2aa23990749360ee0e9f509e13a54b14137 (diff)
completely implements FS#161
save state of treatAsDownloadable() and set on error to specified value
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java b/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java
index 0e50dd4d..1517e5d1 100644
--- a/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java
+++ b/src/main/java/de/thedevstack/conversationsplus/http/HttpDownloadConnection.java
@@ -10,12 +10,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
import java.net.MalformedURLException;
-import java.net.Proxy;
import java.net.URL;
-import java.util.Arrays;
import java.util.concurrent.CancellationException;
import javax.net.ssl.HttpsURLConnection;
@@ -183,6 +179,7 @@ public class HttpDownloadConnection implements Transferable {
HttpDownloadConnection.this.mXmppConnectionService.getNotificationService().push(message);
return;
} catch (RemoteFileNotFoundException e) {
+ message.setNoDownloadable();
cancel();
return;
} catch (IOException e) {