always force close a connection when disabling from error state

This commit is contained in:
Daniel Gultsch 2016-11-24 12:44:24 +01:00
parent 1e59a9517a
commit a87f7903c6
2 changed files with 5 additions and 1 deletions

View File

@ -341,6 +341,10 @@ public class Account extends AbstractEntity {
}
}
public State getTrueStatus() {
return this.status;
}
public void setStatus(final State status) {
this.status = status;
}

View File

@ -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();