aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-11-07 21:17:20 +0100
committerChristian Schneppe <christian@pix-art.de>2016-11-07 21:17:20 +0100
commit9df72adb4fbb94b5c177c5ca88547b75d1e979b0 (patch)
tree9d752171d778cf22fa1546ce35b1d7fbdf865e50 /src
parent387a85d93af2b673cbb8ba00991cf7b061031403 (diff)
schedule correct wakeup call when in low ping timeout mode
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 993a6499e..51f53cef8 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -796,9 +796,10 @@ public class XmppConnectionService extends Service {
account.getXmppConnection().waitForPush();
cancelWakeUpCall(account.getUuid().hashCode());
} else {
- 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());
+ 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)+",lowTimeout="+Boolean.toString(lowTimeout)+")");
+ scheduleWakeUpCall(lowTimeout ? Config.LOW_PING_TIMEOUT: Config.PING_TIMEOUT, account.getUuid().hashCode());
}
}
}