From 43c2aabb17061ee40b578521520bcde3d9b6a4b1 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Fri, 29 Dec 2023 12:36:07 -0500 Subject: [PATCH] Internal ping every two minutes It's not clear why this ping was introduced, but waking up the CPU and doing work every 10 seconds seems excessive, so let's see if this helps with the recent reports of high battery usage. --- .../eu/siacs/conversations/services/XmppConnectionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 89aeefb74f046772a6ed4aec88df29f5c8e2b5ec..b0d9e9d20eabeb7beecd661f4bd49ee39466fa93 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -1519,7 +1519,7 @@ public class XmppConnectionService extends Service { toggleForegroundService(); setupPhoneStateListener(); rescanStickers(); - internalPingExecutor.scheduleAtFixedRate(this::manageAccountConnectionStatesInternal,10,10,TimeUnit.SECONDS); + internalPingExecutor.scheduleAtFixedRate(this::manageAccountConnectionStatesInternal,120,120,TimeUnit.SECONDS); }