diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-05-12 21:57:07 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-05-13 21:56:25 +0200 |
commit | c38ce9a00614777f8666c7fd20e64a19d4a0e4a4 (patch) | |
tree | 40994e9a663fffcd79c27356a6b4eb7182a000f1 /src/main/java/eu | |
parent | 293d87793adde2e63b6916860adbb72c1b6b3e49 (diff) |
reset attempt count when reconnecting because of timeout
Diffstat (limited to 'src/main/java/eu')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 9f6d21e28..ff84e6567 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -599,6 +599,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa long timeout = Config.CONNECT_TIMEOUT - secondsSinceLastConnect; if (timeout < 0) { Log.d(Config.LOGTAG, account.getJid() + ": time out during connect reconnecting"); + account.getXmppConnection().resetAttemptCount(); reconnectAccount(account, true, interactive); } else if (discoTimeout < 0) { account.getXmppConnection().sendDiscoTimeout(); @@ -2648,6 +2649,8 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa if (connection == null) { connection = createConnection(account); account.setXmppConnection(connection); + } else { + connection.interrupt(); } if (!account.isOptionSet(Account.OPTION_DISABLED)) { if (!force) { |