From e7b636019c7e9813a5e33c4eabdb39080a94009f Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Thu, 9 Feb 2017 23:00:37 +0100 Subject: also try to resend failed uploads while sending ping --- .../java/de/pixart/messenger/services/XmppConnectionService.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java/de') 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 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); } } -- cgit v1.2.3