aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian S <christian@pix-art.de>2016-03-05 19:15:05 +0100
committerChristian S <christian@pix-art.de>2016-03-05 19:15:05 +0100
commitda8fbdeabf140fc741c80fe1d6aced9ef06efaf0 (patch)
tree28bbbb7e5b5902450df757f1d53dcbe1239816b3 /src
parent7db4d099743e72e28532187f75f58129f8b00e60 (diff)
resend failed filetransfers automatically
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
index 1e4b91021..e7cc3aa60 100644
--- a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
+++ b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java
@@ -94,8 +94,12 @@ public class HttpUploadConnection implements Transferable {
private void fail() {
mHttpConnectionManager.finishUploadConnection(this);
message.setTransferable(null);
- mXmppConnectionService.markMessage(message, Message.STATUS_SEND_FAILED);
- FileBackend.close(mFileInputStream);
+ if (!canceled){
+ mXmppConnectionService.resendMessage(message, delayed);
+ } else {
+ mXmppConnectionService.markMessage(message, Message.STATUS_SEND_FAILED);
+ FileBackend.close(mFileInputStream);
+ }
}
public void init(Message message, boolean delay) {