aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-10-06 17:23:35 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-10-06 17:23:35 +0200
commit8d8cb92e434a37e24f03892b098fcf1724ded7f8 (patch)
treef002e763bc16484fdde3d5038eba94cbf288c63a /src/main
parent082c06a486fe4cdb8870680a33836f40d570d1fd (diff)
try to fix messages stuck at sending
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java3
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 215d2c09..d14975a2 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -326,7 +326,7 @@ public class XmppConnectionService extends Service {
}
account.pendingConferenceJoins.clear();
scheduleWakeUpCall(Config.PUSH_MODE ? Config.PING_MIN_INTERVAL : Config.PING_MAX_INTERVAL, account.getUuid().hashCode());
- } else if (account.getStatus() == Account.State.OFFLINE) {
+ } else if (account.getStatus() == Account.State.OFFLINE || account.getStatus() == Account.State.DISABLED) {
resetSendingToWaiting(account);
final boolean disabled = account.isOptionSet(Account.OPTION_DISABLED);
final boolean listeners = checkListeners();
@@ -2891,6 +2891,7 @@ public class XmppConnectionService extends Service {
}
public void resetSendingToWaiting(Account account) {
+ Log.d(Config.LOGTAG,account.getJid().toBareJid()+": reset 'sending' messages to 'waiting'");
for (Conversation conversation : getConversations()) {
if (conversation.getAccount() == account) {
conversation.findUnsentTextMessages(new Conversation.OnMessageFound() {
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index 8675a2eb..397d2175 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -1066,6 +1066,7 @@ public class XmppConnection implements Runnable {
mStanzaQueue.clear();
}
}
+ mXmppConnectionService.resetSendingToWaiting(account);
features.carbonsEnabled = false;
features.blockListRequested = false;
synchronized (this.disco) {