diff options
author | iNPUTmice <daniel@gultsch.de> | 2015-02-18 13:37:26 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2015-02-18 13:37:26 +0100 |
commit | b128b33e56d56920d3d5c1327eb15610e5b536f2 (patch) | |
tree | b0e5e61032d6a05a54937325e8fb05dd19278e5f /src/main/java/eu/siacs | |
parent | da2bc6db232d15420d8dde6ca9d8890ef8af5c6a (diff) |
always go through reconnect method instead of just starting XmppConnection threads
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 44d77b45..948e78d4 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -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) { |