aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-10-17 16:10:56 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-10-17 16:10:56 +0200
commitbe38b1e5f4ba646e303eefa90a2d7afe899dea7f (patch)
tree8b243f2f69b0ec4511a9591ac7ade92b5eca18da
parente956c7b2a2e24dbb38435f59c1c70889585c167a (diff)
disconnet in background thread
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java8
1 files changed, 7 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 d9ae6a92..dff133d6 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -722,7 +722,13 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
for (final Account account : accounts) {
databaseBackend.writeRoster(account.getRoster());
if (account.getXmppConnection() != null) {
- disconnect(account, false);
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ disconnect(account, false);
+ }
+ }).start();
+
}
}
Context context = getApplicationContext();