diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-05-10 17:48:09 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-05-13 21:52:10 +0200 |
commit | 5b8b850bc34f261f5a3dff012375938add04da75 (patch) | |
tree | 795e3cbfaf6dfcf46abc72354d54420d5b55d77f /src/main/java/eu/siacs | |
parent | ad3c73a7512491b399b62f19adb7ab34314c5d23 (diff) |
don’t let attempt count fall below zero
Diffstat (limited to 'src/main/java/eu/siacs')
-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 6241140c6..c99459838 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -368,7 +368,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()) { |