From be38b1e5f4ba646e303eefa90a2d7afe899dea7f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 17 Oct 2015 16:10:56 +0200 Subject: [PATCH] disconnet in background thread --- .../conversations/services/XmppConnectionService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index d9ae6a921..dff133d63 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();