issue ping after network change
This commit is contained in:
parent
fef601b4ae
commit
d68b7cfcfc
|
@ -615,7 +615,7 @@ public class XmppConnectionService extends Service {
|
||||||
}
|
}
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
this.wakeLock.acquire();
|
this.wakeLock.acquire();
|
||||||
boolean pingNow = false;
|
boolean pingNow = ConnectivityManager.CONNECTIVITY_ACTION.equals(action);
|
||||||
HashSet<Account> pingCandidates = new HashSet<>();
|
HashSet<Account> pingCandidates = new HashSet<>();
|
||||||
for (Account account : accounts) {
|
for (Account account : accounts) {
|
||||||
pingNow |= processAccountState(account,
|
pingNow |= processAccountState(account,
|
||||||
|
@ -698,7 +698,7 @@ public class XmppConnectionService extends Service {
|
||||||
long discoTimeout = Config.CONNECT_DISCO_TIMEOUT - secondsSinceLastDisco;
|
long discoTimeout = Config.CONNECT_DISCO_TIMEOUT - secondsSinceLastDisco;
|
||||||
long timeout = Config.CONNECT_TIMEOUT - secondsSinceLastConnect;
|
long timeout = Config.CONNECT_TIMEOUT - secondsSinceLastConnect;
|
||||||
if (timeout < 0) {
|
if (timeout < 0) {
|
||||||
Log.d(Config.LOGTAG, account.getJid() + ": time out during connect reconnecting");
|
Log.d(Config.LOGTAG, account.getJid() + ": time out during connect reconnecting (secondsSinceLast="+secondsSinceLastConnect+")");
|
||||||
account.getXmppConnection().resetAttemptCount(false);
|
account.getXmppConnection().resetAttemptCount(false);
|
||||||
reconnectAccount(account, true, interactive);
|
reconnectAccount(account, true, interactive);
|
||||||
} else if (discoTimeout < 0) {
|
} else if (discoTimeout < 0) {
|
||||||
|
|
|
@ -950,7 +950,7 @@ public class XmppConnection implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetEverything() {
|
public void resetEverything() {
|
||||||
resetAttemptCount();
|
resetAttemptCount(true);
|
||||||
resetStreamId();
|
resetStreamId();
|
||||||
clearIqCallbacks();
|
clearIqCallbacks();
|
||||||
mStanzaQueue.clear();
|
mStanzaQueue.clear();
|
||||||
|
|
Loading…
Reference in a new issue