diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 7301c7aa5..977524d13 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) {