don't leave low timeout mode prematurely

This commit is contained in:
Daniel Gultsch 2016-10-20 20:04:16 +02:00
parent f2696b66ba
commit 10398cab51

View File

@ -636,9 +636,6 @@ public class XmppConnectionService extends Service {
} else { } else {
int secs = (int) (pingTimeoutIn / 1000); int secs = (int) (pingTimeoutIn / 1000);
this.scheduleWakeUpCall(secs, account.getUuid().hashCode()); this.scheduleWakeUpCall(secs, account.getUuid().hashCode());
if (mLowPingTimeoutMode.remove(account.getJid().toBareJid())) {
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": leaving low ping timeout mode");
}
} }
} else { } else {
pingCandidates.add(account); pingCandidates.add(account);
@ -651,6 +648,9 @@ public class XmppConnectionService extends Service {
pingNow = true; pingNow = true;
} else { } else {
this.scheduleWakeUpCall((int) (msToNextPing / 1000), account.getUuid().hashCode()); this.scheduleWakeUpCall((int) (msToNextPing / 1000), account.getUuid().hashCode());
if (mLowPingTimeoutMode.remove(account.getJid().toBareJid())) {
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": leaving low ping timeout mode");
}
} }
} }
} else if (account.getStatus() == Account.State.OFFLINE) { } else if (account.getStatus() == Account.State.OFFLINE) {