mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-12 04:05:03 -05:00
reset attempt count when reconnecting because of timeout
This commit is contained in:
parent
2014f388b1
commit
b8c1bd2cba
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user