aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Account.java4
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java
index e0bb6d1d..bb89cf17 100644
--- a/src/main/java/eu/siacs/conversations/entities/Account.java
+++ b/src/main/java/eu/siacs/conversations/entities/Account.java
@@ -341,6 +341,10 @@ public class Account extends AbstractEntity {
}
}
+ public State getTrueStatus() {
+ return this.status;
+ }
+
public void setStatus(final State status) {
this.status = status;
}
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index eba09184..b9aeffee 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -2909,7 +2909,7 @@ public class XmppConnectionService extends Service {
thread.start();
scheduleWakeUpCall(Config.CONNECT_DISCO_TIMEOUT, account.getUuid().hashCode());
} else {
- disconnect(account, force);
+ disconnect(account, force || account.getTrueStatus().isError());
account.getRoster().clearPresences();
connection.resetEverything();
account.getAxolotlService().resetBrokenness();