From af221f911794b0e42d2138a8dc585e2f9a3ad556 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 29 Nov 2024 18:12:23 +0100 Subject: [PATCH] Yahoo: restart every minute --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 00fbf57eab..4595caf58d 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1671,7 +1671,11 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences if (account.keep_alive_noop) { int timeout = prefs.getInt("timeout", EmailService.DEFAULT_CONNECT_TIMEOUT); - iservice.setRestartIdleInterval(timeout * 2 * 6); // 20 x 2 x 6 = 4 min + if (account.isYahoo() && timeout < 60) { + int factor = 60 / timeout; + iservice.setRestartIdleInterval(timeout * factor); + } else + iservice.setRestartIdleInterval(timeout * 2 * 6); // 20 x 2 x 6 = 4 min } final Date lastStillHere = new Date(0);