diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-11-24 21:54:00 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-11-24 21:54:00 +0100 |
commit | fe0d9dd0ce9cf25ba1b2fa2b97858157f25eeedd (patch) | |
tree | f3f02a17b622e61f52b4c0c3a922296e2dd9c7b0 /src | |
parent | e75acffa61b46a6320ca0341252b720b0609536b (diff) |
always force close a connection when disabling from error state
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Account.java | 4 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Account.java b/src/main/java/de/pixart/messenger/entities/Account.java index fb1839d85..d2295e2db 100644 --- a/src/main/java/de/pixart/messenger/entities/Account.java +++ b/src/main/java/de/pixart/messenger/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/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index bb028b354..8f83851bd 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -3059,7 +3059,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(); |