diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-05-10 17:48:09 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-05-10 17:48:09 +0200 |
commit | 8e3948e4954dd847f2d608b9c5018648ef09719b (patch) | |
tree | a58388dd78bb3b8c166f6d11d9efe4cce041a928 | |
parent | c37b5af2ca12beeb2fc7e4caabde79f2e0cd16aa (diff) |
don’t let attempt count fall below zero
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 57dc4ebf3..823fa0ced 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -355,7 +355,7 @@ public class XmppConnection implements Runnable { } catch (final IOException | XmlPullParserException | NoSuchAlgorithmException e) { Log.d(Config.LOGTAG, account.getJid().toBareJid().toString() + ": " + e.getMessage()); this.changeStatus(Account.State.OFFLINE); - this.attempt--; //don't count attempt when reconnecting instantly anyway + this.attempt = Math.max(0, this.attempt - 1); } finally { forceCloseSocket(); if (wakeLock.isHeld()) { |