always go through reconnect method instead of just starting XmppConnection threads

This commit is contained in:
iNPUTmice 2015-02-18 13:37:26 +01:00
parent da2bc6db23
commit b128b33e56
1 changed files with 1 additions and 4 deletions

View File

@ -466,10 +466,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
this.scheduleWakeUpCall((int) (msToNextPing / 1000), account.getUuid().hashCode());
}
} else if (account.getStatus() == Account.State.OFFLINE) {
if (account.getXmppConnection() == null) {
account.setXmppConnection(this.createConnection(account));
}
new Thread(account.getXmppConnection()).start();
reconnectAccount(account,true);
} else if (account.getStatus() == Account.State.CONNECTING) {
long timeout = Config.CONNECT_TIMEOUT - ((SystemClock.elapsedRealtime() - account.getXmppConnection().getLastConnect()) / 1000);
if (timeout < 0) {