From 83b1238b516f26b06fab6dcd4535baae77536c0d Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 3 Jan 2021 17:35:52 +0100 Subject: [PATCH] Increased default connection timeout --- app/src/main/java/eu/faircode/email/EmailService.java | 2 +- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EmailService.java b/app/src/main/java/eu/faircode/email/EmailService.java index c78bb15661..b77d7ba764 100644 --- a/app/src/main/java/eu/faircode/email/EmailService.java +++ b/app/src/main/java/eu/faircode/email/EmailService.java @@ -126,7 +126,7 @@ public class EmailService implements AutoCloseable { static final int ENCRYPTION_STARTTLS = 1; static final int ENCRYPTION_NONE = 2; - final static int DEFAULT_CONNECT_TIMEOUT = 15; // seconds + final static int DEFAULT_CONNECT_TIMEOUT = 20; // seconds final static boolean SEPARATE_STORE_CONNECTION = false; private final static int SEARCH_TIMEOUT = 90 * 1000; // milliseconds diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index fce966e7d9..d97596ffd1 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -121,7 +121,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences private static final int OPTIMIZE_KEEP_ALIVE_INTERVAL = 12; // minutes private static final int OPTIMIZE_POLL_INTERVAL = 15; // minutes private static final int CONNECT_BACKOFF_START = 8; // seconds - private static final int CONNECT_BACKOFF_MAX = 8; // seconds (totally 8+2x15=38 seconds) + private static final int CONNECT_BACKOFF_MAX = 8; // seconds (totally 8+2x20=48 seconds) private static final int CONNECT_BACKOFF_ALARM_START = 15; // minutes private static final int CONNECT_BACKOFF_ALARM_MAX = 60; // minutes private static final long CONNECT_BACKOFF_GRACE = 2 * 60 * 1000L; // milliseconds