From 8e3948e4954dd847f2d608b9c5018648ef09719b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 10 May 2016 17:48:09 +0200 Subject: =?UTF-8?q?don=E2=80=99t=20let=20attempt=20count=20fall=20below=20?= =?UTF-8?q?zero?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index 57dc4ebf..823fa0ce 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()) { -- cgit v1.2.3