diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-02-09 23:00:37 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-02-09 23:00:37 +0100 |
commit | e7b636019c7e9813a5e33c4eabdb39080a94009f (patch) | |
tree | c92300470f3a6b36e7085391f206689c9c7c88fb /src/main/java/de/pixart/messenger | |
parent | e8bf1da975a558c2b644303efa8444055b3396ce (diff) |
also try to resend failed uploads while sending ping
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index 5065d4242..a81adfe23 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -711,6 +711,12 @@ public class XmppConnectionService extends Service { } if (pingNow) { for (Account account : pingCandidates) { + List<Conversation> conversations = getConversations(); + for (Conversation conversation : conversations) { + if (conversation.getAccount() == account && !account.pendingConferenceJoins.contains(conversation)) { + resendFailedFileMessages(conversation); + } + } final boolean lowTimeout = mLowPingTimeoutMode.contains(account.getJid().toBareJid()); account.getXmppConnection().sendPing(); Log.d(Config.LOGTAG, account.getJid().toBareJid() + " send ping (action=" + action + ", lowTimeout=" + Boolean.toString(lowTimeout) + ")"); @@ -1431,6 +1437,7 @@ public class XmppConnectionService extends Service { @Override public void onMessageFound(Message message) { if (AcceptFileSize() >= message.getFileParams().size) { + Log.d(Config.LOGTAG, "Resend failed message with size " + message.getFileParams().size + " bytes for " + conversation.getJid()); resendMessage(message, true); } } |