schedule correct wakeup call when in low ping timeout mode
This commit is contained in:
parent
1e4b1a3346
commit
a44f35ed69
|
@ -695,9 +695,10 @@ public class XmppConnectionService extends Service {
|
||||||
account.getXmppConnection().waitForPush();
|
account.getXmppConnection().waitForPush();
|
||||||
cancelWakeUpCall(account.getUuid().hashCode());
|
cancelWakeUpCall(account.getUuid().hashCode());
|
||||||
} else {
|
} else {
|
||||||
|
final boolean lowTimeout = mLowPingTimeoutMode.contains(account.getJid().toBareJid());
|
||||||
account.getXmppConnection().sendPing();
|
account.getXmppConnection().sendPing();
|
||||||
Log.d(Config.LOGTAG, account.getJid().toBareJid() + " send ping (action=" + action + ",listeners="+Boolean.toString(listeners)+")");
|
Log.d(Config.LOGTAG, account.getJid().toBareJid() + " send ping (action=" + action + ",listeners="+Boolean.toString(listeners)+",lowTimeout="+Boolean.toString(lowTimeout)+")");
|
||||||
scheduleWakeUpCall(Config.PING_TIMEOUT, account.getUuid().hashCode());
|
scheduleWakeUpCall(lowTimeout ? Config.LOW_PING_TIMEOUT: Config.PING_TIMEOUT, account.getUuid().hashCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue