disconnet in background thread

This commit is contained in:
Daniel Gultsch 2015-10-17 16:10:56 +02:00
parent e956c7b2a2
commit be38b1e5f4

View file

@ -722,7 +722,13 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
for (final Account account : accounts) { for (final Account account : accounts) {
databaseBackend.writeRoster(account.getRoster()); databaseBackend.writeRoster(account.getRoster());
if (account.getXmppConnection() != null) { if (account.getXmppConnection() != null) {
disconnect(account, false); new Thread(new Runnable() {
@Override
public void run() {
disconnect(account, false);
}
}).start();
} }
} }
Context context = getApplicationContext(); Context context = getApplicationContext();