diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-05-12 21:57:07 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-05-12 21:57:07 +0200 |
commit | b8c1bd2cbaf0ed3fe2ddf9525c6bd1fab1bc3e06 (patch) | |
tree | 4697093520b21fbb17f355bdf1f952dddc868b21 /src/main/java | |
parent | 2014f388b1f5eef66c8f787dc6889b03ae461d08 (diff) |
reset attempt count when reconnecting because of timeout
Diffstat (limited to 'src/main/java')
-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 7301c7aa..977524d1 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -604,6 +604,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(); @@ -2652,6 +2653,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) { |