always force close a connection when disabling from error state
This commit is contained in:
parent
1e59a9517a
commit
a87f7903c6
|
@ -341,6 +341,10 @@ public class Account extends AbstractEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public State getTrueStatus() {
|
||||||
|
return this.status;
|
||||||
|
}
|
||||||
|
|
||||||
public void setStatus(final State status) {
|
public void setStatus(final State status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2909,7 +2909,7 @@ public class XmppConnectionService extends Service {
|
||||||
thread.start();
|
thread.start();
|
||||||
scheduleWakeUpCall(Config.CONNECT_DISCO_TIMEOUT, account.getUuid().hashCode());
|
scheduleWakeUpCall(Config.CONNECT_DISCO_TIMEOUT, account.getUuid().hashCode());
|
||||||
} else {
|
} else {
|
||||||
disconnect(account, force);
|
disconnect(account, force || account.getTrueStatus().isError());
|
||||||
account.getRoster().clearPresences();
|
account.getRoster().clearPresences();
|
||||||
connection.resetEverything();
|
connection.resetEverything();
|
||||||
account.getAxolotlService().resetBrokenness();
|
account.getAxolotlService().resetBrokenness();
|
||||||
|
|
Loading…
Reference in New Issue