aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-10-29 21:45:01 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-10-29 21:45:01 +0200
commita44f35ed69299239d25c4d23e58bb427ff410867 (patch)
tree609d3ec173f5de44707e676ef204d48232454667 /src/main/java/eu/siacs
parent1e4b1a3346d7ead61171a25ec9764f832ea2bbae (diff)
schedule correct wakeup call when in low ping timeout mode
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 5a31908d..936c19f6 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -695,9 +695,10 @@ public class XmppConnectionService extends Service {
account.getXmppConnection().waitForPush();
cancelWakeUpCall(account.getUuid().hashCode());
} else {
+ final boolean lowTimeout = mLowPingTimeoutMode.contains(account.getJid().toBareJid());
account.getXmppConnection().sendPing();
- Log.d(Config.LOGTAG, account.getJid().toBareJid() + " send ping (action=" + action + ",listeners="+Boolean.toString(listeners)+")");
- scheduleWakeUpCall(Config.PING_TIMEOUT, account.getUuid().hashCode());
+ Log.d(Config.LOGTAG, account.getJid().toBareJid() + " send ping (action=" + action + ",listeners="+Boolean.toString(listeners)+",lowTimeout="+Boolean.toString(lowTimeout)+")");
+ scheduleWakeUpCall(lowTimeout ? Config.LOW_PING_TIMEOUT: Config.PING_TIMEOUT, account.getUuid().hashCode());
}
}
}